aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit
diff options
context:
space:
mode:
authorsyeyoung <42869671+cyoung06@users.noreply.github.com>2020-11-27 22:24:48 +0900
committersyeyoung <42869671+cyoung06@users.noreply.github.com>2020-11-27 22:24:48 +0900
commit314be153363dbf4d457363b70e7af77fd13d19c9 (patch)
tree8e7bd94e7623ce3193e13d6a7c6b1502448749cb /src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit
parentb446655945ba1d9b92155f7fc43b37f0f2821c2a (diff)
downloadSkyblock-Dungeons-Guide-314be153363dbf4d457363b70e7af77fd13d19c9.tar.gz
Skyblock-Dungeons-Guide-314be153363dbf4d457363b70e7af77fd13d19c9.tar.bz2
Skyblock-Dungeons-Guide-314be153363dbf4d457363b70e7af77fd13d19c9.zip
WATER PUZZLE SOLVER DONE. PERIOD.
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPointSet.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPointSet.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPointSet.java
index cf617143..6eadbff7 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPointSet.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditOffsetPointSet.java
@@ -66,6 +66,35 @@ public class ValueEditOffsetPointSet extends MPanel implements ValueEdit<OffsetP
}
@Override
+ public boolean mouseClicked0(int absMouseX, int absMouseY, int relMouseX0, int relMouseY0, int mouseButton) {
+ if (!bounds.contains(relMouseX0, relMouseY0)) {
+ return false;
+ }
+
+ int relMousex = relMouseX0 - bounds.x;
+ int relMousey = relMouseY0 - bounds.y;
+
+ boolean noClip = true;
+ boolean focusedOverall = false;
+ for (MPanel childComponent : getChildComponents()) {
+ if (childComponent.mouseClicked0(absMouseX, absMouseY, relMousex, relMousey, mouseButton)) {
+ noClip = false;
+ focusedOverall = true;
+ }
+ }
+
+ if (bounds.contains(relMouseX0, relMouseY0) && noClip) {
+ isFocused = true;
+ focusedOverall = true;
+ } else {
+ isFocused = false;
+ }
+
+ mouseClicked(absMouseX, absMouseY, relMousex, relMousey, mouseButton);
+ return focusedOverall;
+ }
+
+ @Override
public void onBoundsUpdate() {
for (MPanel panel :getChildComponents()){
panel.setSize(new Dimension(bounds.width, 20));