"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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user