mirror of
https://github.com/GTNewHorizons/Mantle.git
synced 2026-11-20 20:12:28 +00:00
Have slider only return valid values and 0 if it's hidden
This commit is contained in:
1 parent
dba8800040
commit
925b27813b
1 file changed
+4
-1
@@ -75,7 +75,10 @@ public class GuiWidgetSlider extends GuiWidget {
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return currentValue;
|
||||
if(isHidden()) {
|
||||
return 0;
|
||||
}
|
||||
return Math.min(maxValue, Math.max(minValue, currentValue));
|
||||
}
|
||||
|
||||
public void setEnabled(boolean enabled) {
|
||||
|
||||
Reference in new issue
Block a user