diff options
| author | Moulberry <james.jenour@student.scotch.wa.edu.au> | 2020-08-17 00:13:03 +1000 |
|---|---|---|
| committer | Moulberry <james.jenour@student.scotch.wa.edu.au> | 2020-08-17 00:13:03 +1000 |
| commit | 0c23f52d2be811d74a3b6ef598dd9de7ccb763ab (patch) | |
| tree | 74bf92e821268b2c18527e0dc02c6587e3d5b5bb /src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiGroup.java | |
| parent | 0d3a0d7355dac828a97977730bc3acc4dee7e1b4 (diff) | |
| download | notenoughupdates-0c23f52d2be811d74a3b6ef598dd9de7ccb763ab.tar.gz notenoughupdates-0c23f52d2be811d74a3b6ef598dd9de7ccb763ab.tar.bz2 notenoughupdates-0c23f52d2be811d74a3b6ef598dd9de7ccb763ab.zip | |
1.1.3
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiGroup.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiGroup.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiGroup.java b/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiGroup.java index aba1d743..86ff7278 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiGroup.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mbgui/MBGuiGroup.java @@ -35,8 +35,10 @@ public abstract class MBGuiGroup extends MBGuiElement { @Override public void mouseClick(float x, float y, int mouseX, int mouseY) { + Map<MBGuiElement, Vector2f> childrenPos = getChildrenPosition(); + for(MBGuiElement child : getChildren()) { - Vector2f childPos = childrenPosition.get(child); + Vector2f childPos = childrenPos.get(child); if(mouseX > x+childPos.x && mouseX < x+childPos.x+child.getWidth()) { if(mouseY > y+childPos.y && mouseY < y+childPos.y+child.getHeight()) { child.mouseClick(x+childPos.x, y+childPos.y, mouseX, mouseY); |
