aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/features/text
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features/text')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/text/TextHUDFeature.java16
2 files changed, 11 insertions, 7 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java b/src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java
index 4be95491..6595aee4 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java
@@ -41,7 +41,7 @@ public class PanelTextParameterConfig extends MPanel {
@Override
public void resize(int parentWidth, int parentHeight) {
- this.setBounds(new Rectangle(5,5,parentWidth-10, parentHeight-10));
+ this.setBounds(new Rectangle(5,5,parentWidth-10, 120));
}
private GuiConfig config;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/text/TextHUDFeature.java b/src/main/java/kr/syeyoung/dungeonsguide/features/text/TextHUDFeature.java
index d019f6bd..a7502a7f 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/text/TextHUDFeature.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/text/TextHUDFeature.java
@@ -14,12 +14,11 @@ import lombok.AllArgsConstructor;
import lombok.Data;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
+import scala.actors.threadpool.Arrays;
import java.awt.*;
-import java.util.ArrayList;
-import java.util.HashMap;
+import java.util.*;
import java.util.List;
-import java.util.Map;
public abstract class TextHUDFeature extends GuiFeature {
protected TextHUDFeature(String category, String name, String description, String key, boolean keepRatio, int width, int height) {
@@ -29,7 +28,9 @@ public abstract class TextHUDFeature extends GuiFeature {
@Override
public void drawHUD(float partialTicks) {
- drawTextWithStylesAssociated(getText(), 0, 0, getStylesMap());
+
+ if (isHUDViewable())
+ drawTextWithStylesAssociated(getText(), 0, 0, getStylesMap());
}
@Override
@@ -37,7 +38,7 @@ public abstract class TextHUDFeature extends GuiFeature {
drawTextWithStylesAssociated(getDummyText(), 0, 0, getStylesMap());
}
- public abstract boolean isEnabled();
+ public abstract boolean isHUDViewable();
public abstract List<String> getUsedTextStyle();
public List<StyledText> getDummyText() {
@@ -159,7 +160,10 @@ public abstract class TextHUDFeature extends GuiFeature {
ConfigPanelCreator.map.put("base." + getKey() , new Supplier<MPanel>() {
@Override
public MPanel get() {
- return new PanelTextParameterConfig(config, TextHUDFeature.this);
+ return new PanelDefaultParameterConfig(config, TextHUDFeature.this,
+ Arrays.asList(new MPanel[] {
+ new PanelTextParameterConfig(config, TextHUDFeature.this)
+ }), Collections.singleton("textStyles"));
}
});
return "base." + getKey() ;