aboutsummaryrefslogtreecommitdiff
path: root/mod/src/main/java/kr/syeyoung/dungeonsguide
diff options
context:
space:
mode:
Diffstat (limited to 'mod/src/main/java/kr/syeyoung/dungeonsguide')
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/AbstractHUDFeature.java7
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/mechanicbrowser/FeatureMechanicBrowse.java8
2 files changed, 13 insertions, 2 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/AbstractHUDFeature.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/AbstractHUDFeature.java
index 94bec8fd..51f9a8b4 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/AbstractHUDFeature.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/AbstractHUDFeature.java
@@ -56,15 +56,18 @@ public abstract class AbstractHUDFeature extends AbstractGuiFeature {
updatePosition();
}
+ public double minWidth() {return 10;}
+
+ public double minHeight() {return 10;}
public void setWidth(double width) {
if (!requiresWidthBound()) throw new UnsupportedOperationException("Width unsettable");
- if (width < 10) width = 10;
+ if (width < minWidth()) width = minWidth();
featureRect.setWidth(width);
updatePosition();
}
public void setHeight(double height) {
if (!requiresHeightBound() && (getKeepRatio() == null)) throw new UnsupportedOperationException("Height unsettable");
- if (height < 10) height = 10;
+ if (height < minHeight()) height = minHeight();
if (getKeepRatio() != null)
featureRect.setWidth(height / getKeepRatio());
else
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/mechanicbrowser/FeatureMechanicBrowse.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/mechanicbrowser/FeatureMechanicBrowse.java
index 7b805234..8c453b78 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/mechanicbrowser/FeatureMechanicBrowse.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/mechanicbrowser/FeatureMechanicBrowse.java
@@ -71,7 +71,15 @@ public class FeatureMechanicBrowse extends RawRenderingGuiFeature {
return this.<Double>getParameter("scale").getValue();
}
+ @Override
+ public double minWidth() {
+ return 100 * FeatureMechanicBrowse.this.<Double>getParameter("scale").getValue();
+ }
+ @Override
+ public double minHeight() {
+ return 50 * FeatureMechanicBrowse.this.<Double>getParameter("scale").getValue();
+ }
@Override
public void drawDemo(float partialTicks) {