aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/features/impl
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-01-01 20:29:29 +0900
committersyeyoung <cyong06@naver.com>2021-01-01 20:29:29 +0900
commit5503237b9b2a2b75188188341f2dd8abe477c9f5 (patch)
tree53566f82f118b52ef2d432abf9f21d2976ee9ca2 /src/main/java/kr/syeyoung/dungeonsguide/features/impl
parentbe44a7665e4982934998020d3bb930be25a50c25 (diff)
downloadSkyblock-Dungeons-Guide-5503237b9b2a2b75188188341f2dd8abe477c9f5.tar.gz
Skyblock-Dungeons-Guide-5503237b9b2a2b75188188341f2dd8abe477c9f5.tar.bz2
Skyblock-Dungeons-Guide-5503237b9b2a2b75188188341f2dd8abe477c9f5.zip
ah yes?
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features/impl')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureCooldownCounter.java18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureCooldownCounter.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureCooldownCounter.java
index dc2b7dd8..76a942a2 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureCooldownCounter.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureCooldownCounter.java
@@ -1,13 +1,18 @@
package kr.syeyoung.dungeonsguide.features.impl;
+import kr.syeyoung.dungeonsguide.features.FeatureParameter;
import kr.syeyoung.dungeonsguide.features.GuiFeature;
+import kr.syeyoung.dungeonsguide.features.listener.TickListener;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import org.lwjgl.opengl.GL11;
-public class FeatureCooldownCounter extends GuiFeature {
+import java.awt.*;
+
+public class FeatureCooldownCounter extends GuiFeature implements TickListener {
public FeatureCooldownCounter() {
- super("QoL", "Dungeon Cooldown Counter", "Counts 10 seconds after leaving dungeon", "qol.cooldown", true, 100, 50);
+ super("QoL", "Dungeon Cooldown Counter", "Counts 10 seconds after leaving dungeon", "qol.cooldown", true, getFontRenderer().getStringWidth("Cooldown: 10s "), getFontRenderer().FONT_HEIGHT);
+ parameters.put("color", new FeatureParameter<Color>("color", "Color", "Color of text", Color.white, "color"));
}
@Override
@@ -15,7 +20,7 @@ public class FeatureCooldownCounter extends GuiFeature {
FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
double scale = getFeatureRect().getHeight() / fr.FONT_HEIGHT;
GL11.glScaled(scale, scale, 0);
- fr.drawString("Cooldown: 1s", 0,0,0xFFFFFFFF);
+ fr.drawString("Cooldown: 1s", 0,0,this.<Color>getParameter("color").getValue().getRGB());
}
@Override
@@ -23,6 +28,11 @@ public class FeatureCooldownCounter extends GuiFeature {
FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
double scale = getFeatureRect().getHeight() / fr.FONT_HEIGHT;
GL11.glScaled(scale, scale, 0);
- fr.drawString("Cooldown: 1s", 0,0,0xFFFFFFFF);
+ fr.drawString("Cooldown: 10s", 0,0,this.<Color>getParameter("color").getValue().getRGB());
+ }
+
+ @Override
+ public void onTick() {
+
}
}