"The Commit that properly implements the disabling of Gui Elements"

Added enabled Field to DelegatingElement, which every instance can handle itself
Made isEnabled Field in GuiAdvancedTextField protected for subclasses to access
Made GuiDraggingNumberInput only draggable while enabled
Made GuiDropdown check enabled field before accepting mouse clicks
Properly tints GuiTexturedButton if disabled
This commit is contained in:
CrushedPixel
2015-07-10 03:33:39 +02:00
parent 59e6b87935
commit 5828b04596
5 changed files with 18 additions and 6 deletions

View File

@@ -24,7 +24,7 @@ public class GuiDraggingNumberInput extends GuiNumberInputWithText {
@Override
public void mouseClick(Minecraft mc, int mouseX, int mouseY, int button) {
if(MouseUtils.isMouseWithinBounds(xPosition, yPosition, width, height)) {
if(MouseUtils.isMouseWithinBounds(xPosition, yPosition, width, height) && isEnabled) {
dragging = false;
clicked = true;
prevMouseX = mouseX;