mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-21 18:23:54 -04:00
update
This commit is contained in:
parent
160c8d3af8
commit
aed397f305
@ -1369,7 +1369,7 @@ public final class FXUtils {
|
||||
|
||||
public static <T> void onScroll(Node node, List<T> list,
|
||||
ToIntFunction<List<T>> finder,
|
||||
Consumer<T> changer
|
||||
Consumer<T> updater
|
||||
) {
|
||||
node.addEventHandler(ScrollEvent.SCROLL, event -> {
|
||||
double deltaY = event.getDeltaY();
|
||||
@ -1383,7 +1383,7 @@ public final class FXUtils {
|
||||
else // down
|
||||
index++;
|
||||
|
||||
changer.accept(list.get((index + list.size()) % list.size()));
|
||||
updater.accept(list.get((index + list.size()) % list.size()));
|
||||
event.consume();
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user