Skip to content

Commit

Permalink
Convenience functions for slider and draw disabled button if disabled…
Browse files Browse the repository at this point in the history
… but shown
  • Loading branch information
bonii-xx committed Dec 21, 2015
1 parent c71c1dc commit f2bc0a3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/slimeknights/mantle/client/gui/GuiWidgetSlider.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ public int getValue() {
return currentValue;
}

public void setEnabled(boolean enabled) {
this.enabled = enabled;
}

public void enable() {
this.enabled = true;
}
Expand All @@ -90,6 +94,10 @@ public boolean isEnabled() {
return this.enabled;
}

public void setHidden(boolean hidden) {
this.hidden = hidden;
}

public void hide() {
this.hidden = true;
}
Expand Down Expand Up @@ -127,6 +135,9 @@ else if(isHighlighted) {
slider.draw(x, y);
}
}
else {
sliderDisabled.draw(x, y);
}
}

public void update(int mouseX, int mouseY, boolean useMouseWheel) {
Expand Down

0 comments on commit f2bc0a3

Please sign in to comment.