diff options
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/test/TestHud.java')
-rw-r--r-- | src/main/java/io/polyfrost/oneconfig/test/TestHud.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/main/java/io/polyfrost/oneconfig/test/TestHud.java b/src/main/java/io/polyfrost/oneconfig/test/TestHud.java new file mode 100644 index 0000000..0ce2984 --- /dev/null +++ b/src/main/java/io/polyfrost/oneconfig/test/TestHud.java @@ -0,0 +1,23 @@ +package io.polyfrost.oneconfig.test; + +import io.polyfrost.oneconfig.hud.interfaces.BasicHud; +import io.polyfrost.oneconfig.renderer.Renderer; +import net.minecraft.client.Minecraft; + +public class TestHud extends BasicHud { + + @Override + public int getWidth(float scale) { + return (int) (Minecraft.getMinecraft().fontRendererObj.getStringWidth("FPS: " + Minecraft.getDebugFPS()) * scale); + } + + @Override + public int getHeight(float scale) { + return (int) (9 * scale); + } + + @Override + public void draw(int x, int y, float scale) { + Renderer.drawTextScale("FPS: " + Minecraft.getDebugFPS(), x, y, 0xffffff, false, scale); + } +} |