aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/features/impl
diff options
context:
space:
mode:
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() {
+
}
}