diff options
author | syeyoung <cyong06@naver.com> | 2021-02-12 00:03:42 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-02-12 00:03:42 +0900 |
commit | 89c82ad1fea9fd0a8e32a5e818c6c01856cdd660 (patch) | |
tree | eb989b2e58b2b18480d41a262b9cabf1a0ba387d /src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java | |
parent | 505cb6fc92e7d2c7412b43f459796791ca36e5a3 (diff) | |
download | Skyblock-Dungeons-Guide-89c82ad1fea9fd0a8e32a5e818c6c01856cdd660.tar.gz Skyblock-Dungeons-Guide-89c82ad1fea9fd0a8e32a5e818c6c01856cdd660.tar.bz2 Skyblock-Dungeons-Guide-89c82ad1fea9fd0a8e32a5e818c6c01856cdd660.zip |
YES
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java | 17 |
1 files changed, 17 insertions, 0 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 06ac0fca..3a87075c 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java @@ -13,6 +13,7 @@ import kr.syeyoung.dungeonsguide.gui.MPanel; import kr.syeyoung.dungeonsguide.gui.elements.MButton; import kr.syeyoung.dungeonsguide.gui.elements.MColor; import kr.syeyoung.dungeonsguide.gui.elements.MEditableAColor; +import kr.syeyoung.dungeonsguide.gui.elements.MToggleButton; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.Gui; @@ -35,6 +36,7 @@ public class PanelTextParameterConfig extends MPanel { private MEditableAColor currentColor; private MEditableAColor backgroundColor; + private MToggleButton shadow; @Override public void onBoundsUpdate() { @@ -77,6 +79,17 @@ public class PanelTextParameterConfig extends MPanel { } }); add(backgroundColor); + shadow = new MToggleButton(); + shadow.setSize(new Dimension(20, 10)); + shadow.setBounds(new Rectangle(275 , 30, 20, 10)); + shadow.setOnToggle(new Runnable() { + @Override + public void run() { + for (String se:selected) + feature.getStylesMap().get(se).setShadow(shadow.isEnabled()); + } + }); + add(shadow); } @@ -132,6 +145,7 @@ public class PanelTextParameterConfig extends MPanel { GlStateManager.popMatrix(); fr.drawString("Text Color: ", 0, 10, 0xFFFFFFFF); fr.drawString("Background Color: ", 100, 10, 0xFFFFFFFF); + fr.drawString("Shadow: ", 0, 26, 0xFFFFFFFF); GlStateManager.popMatrix(); } @@ -177,15 +191,18 @@ public class PanelTextParameterConfig extends MPanel { if (selected.size() != 0) { currentColor.setColor(styles.get(selected.iterator().next()).getColor()); backgroundColor.setColor(styles.get(selected.iterator().next()).getBackground()); + shadow.setEnabled(styles.get(selected.iterator().next()).isShadow()); } else { currentColor.setColor(new AColor(0xff555555, true)); backgroundColor.setColor(new AColor(0xff555555, true)); + shadow.setEnabled(false); } } if (selected.size() == 1) { currentColor.setColor(styles.get(selected.iterator().next()).getColor()); backgroundColor.setColor(styles.get(selected.iterator().next()).getBackground()); + shadow.setEnabled(styles.get(selected.iterator().next()).isShadow()); } } |