mirror of
https://github.com/GTNewHorizons/Mantle.git
synced 2026-11-19 11:49:08 +00:00
Mouse wheel support for sliders!
Just don't have 2 in one screen.
This commit is contained in:
1 parent
b07c30ef31
commit
40b55f9f06
1 file changed
+10
@@ -135,6 +135,16 @@ public class GuiWidgetSlider extends GuiWidget {
|
||||
}
|
||||
|
||||
boolean mouseDown = Mouse.isButtonDown(0); // left mouse button
|
||||
int wheel = Mouse.getDWheel();
|
||||
|
||||
if(wheel > 0) {
|
||||
decrement();
|
||||
return;
|
||||
}
|
||||
else if(wheel < 0) {
|
||||
increment();
|
||||
return;
|
||||
}
|
||||
|
||||
// relative position inside the widget
|
||||
int x = mouseX - xPos;
|
||||
|
||||
Reference in new issue
Block a user