aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/test/TestHud.java
blob: 023ae430ebcff807f7653bb6d787d2e3c83e9e46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package cc.polyfrost.oneconfig.test;

import cc.polyfrost.oneconfig.config.annotations.Switch;
import cc.polyfrost.oneconfig.config.annotations.Text;
import cc.polyfrost.oneconfig.hud.TextHud;
import net.minecraft.client.Minecraft;

import java.util.ArrayList;
import java.util.List;

public class TestHud extends TextHud {
    public TestHud(boolean enabled, int x, int y) {
        super(enabled, x, y);
    }

    @Override
    public List<String> getLines() {
        ArrayList<String> lines = new ArrayList<>();
        lines.add("FPS: " + Minecraft.getDebugFPS());
        if (hasSecondLine) lines.add(secondLine);
        return lines;
    }

    @Switch(
            name = "Has Second Line"
    )
    public boolean hasSecondLine = false;

    @Text(
            name = "Second Line Text"
    )
    public String secondLine = "Epic text";
}