mirror of
https://github.com/sojamo/controlp5
synced 2025-03-13 16:21:42 +01:00
Merge cabff9ab86edf70392d1337b05d8c1c3c751478d into 1f7cb649865eb8657495b5cfeddd0dbe85d70cac
This commit is contained in:
commit
8df320f676
@ -128,9 +128,14 @@ public class ListBox extends Controller< ListBox > implements ControlListener {
|
||||
} else if ( isOpen ) {
|
||||
|
||||
double n = Math.floor( ( getPointer( ).y( ) - barHeight ) / itemHeight );
|
||||
|
||||
|
||||
// n += itemRange; /* UP */
|
||||
int index = ( int ) n + itemIndexOffset;
|
||||
|
||||
if ( index < 0 || index >= items.size() ) {
|
||||
// no need to go further, there is something wrong in the position process
|
||||
return;
|
||||
}
|
||||
|
||||
Map m = items.get( index );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user