GuiElement interface's mouseClick method returns a boolean which is handled by ComposedElement to prevent mouse clicks on multiple elements at once
ComposedElement's entries are sorted so that GuiDropdown are always drawn on top Modified thrown UnsupportedOperationExceptions in CustomImageObject to not be thrown if asset is null
This commit is contained in:
@@ -61,12 +61,14 @@ public class GuiScrollbar extends Gui implements GuiElement {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseClick(Minecraft mc, int mouseX, int mouseY, int button) {
|
||||
if(!enabled) return;
|
||||
public boolean mouseClick(Minecraft mc, int mouseX, int mouseY, int button) {
|
||||
if(!enabled) return false;
|
||||
if (isHovering(mouseX, mouseY)) {
|
||||
draggingStart = mouseX;
|
||||
draggingStartPosition = sliderPosition;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user