aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-08-04 15:27:06 +0900
committersyeyoung <cyong06@naver.com>2021-08-04 15:27:06 +0900
commit708c5d2f75060c17ffc7864c53b6ed7f15df3d7d (patch)
tree1deb00f0bac0e854732a32c42ae8013fb1b4ed6d /src/main/java/kr/syeyoung/dungeonsguide
parentecf7ff8db99a178dec09829abcc929a882a6bc01 (diff)
downloadSkyblock-Dungeons-Guide-708c5d2f75060c17ffc7864c53b6ed7f15df3d7d.tar.gz
Skyblock-Dungeons-Guide-708c5d2f75060c17ffc7864c53b6ed7f15df3d7d.tar.bz2
Skyblock-Dungeons-Guide-708c5d2f75060c17ffc7864c53b6ed7f15df3d7d.zip
- Fix Edit not working
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/nyu/MParameterEdit.java5
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/gui/elements/MFloatSelectionButton.java5
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/gui/elements/MIntegerSelectionButton.java6
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTextField.java6
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/gui/elements/MToggleButton.java5
5 files changed, 24 insertions, 3 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/nyu/MParameterEdit.java b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/nyu/MParameterEdit.java
index 4bf958db..b0fd43f0 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/nyu/MParameterEdit.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/nyu/MParameterEdit.java
@@ -143,9 +143,8 @@ public class MParameterEdit extends MPanel {
@Override
public Dimension getPreferredSize() {
FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
- int descriptionHeight = fr.listFormattedStringToWidth(featureParameter.getDescription(), 2*bounds.width /3-10).size() * fr.FONT_HEIGHT;
-
- return new Dimension(100, Math.max(Math.max(30, descriptionHeight + 23), valueEditHolder.getPreferredSize().height));
+ int descriptionHeight = fr.listFormattedStringToWidth(featureParameter.getDescription(), Math.max(50, 2*bounds.width/3-10)).size() * fr.FONT_HEIGHT;
+ return new Dimension(100, Math.max(30, descriptionHeight + 23));
}
@Override
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MFloatSelectionButton.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MFloatSelectionButton.java
index 3920e288..99d7b322 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MFloatSelectionButton.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MFloatSelectionButton.java
@@ -75,6 +75,11 @@ public class MFloatSelectionButton extends MPanel {
});
}
+ @Override
+ public Dimension getPreferredSize() {
+ return new Dimension(-1,15);
+ }
+
public float getSelected() {
return data;
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MIntegerSelectionButton.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MIntegerSelectionButton.java
index a8519509..9f5ac258 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MIntegerSelectionButton.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MIntegerSelectionButton.java
@@ -71,6 +71,12 @@ public class MIntegerSelectionButton extends MPanel {
});
}
+
+ @Override
+ public Dimension getPreferredSize() {
+ return new Dimension(-1,15);
+ }
+
public int getSelected() {
return data;
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTextField.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTextField.java
index 827dc3e8..b40acd02 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTextField.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTextField.java
@@ -58,6 +58,12 @@ public class MTextField extends MPanel {
public void edit(String str) {
}
+
+
+ @Override
+ public Dimension getPreferredSize() {
+ return new Dimension(-1,15);
+ }
public void setText(String text) {
this.text = text;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MToggleButton.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MToggleButton.java
index 3c223d84..4d1e6fb7 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MToggleButton.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MToggleButton.java
@@ -75,6 +75,11 @@ public class MToggleButton extends MPanel {
}
@Override
+ public Dimension getPreferredSize() {
+ return new Dimension(40,15);
+ }
+
+ @Override
public void mouseClicked(int absMouseX, int absMouseY, int relMouseX, int relMouseY, int mouseButton) {
if (onToggle != null && lastAbsClip.contains(absMouseX, absMouseY) && getTooltipsOpen() == 0) {
enabled = !enabled;