aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/gui/elements/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/gui/elements/config')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigInfo.java19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigInfo.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigInfo.java
index 68ebf37..7810d57 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigInfo.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigInfo.java
@@ -13,30 +13,17 @@ import cc.polyfrost.oneconfig.lwjgl.scissor.ScissorManager;
import java.lang.reflect.Field;
public class ConfigInfo extends BasicOption {
- private SVGs image;
+ private InfoType type;
public ConfigInfo(Field field, Object parent, String name, int size, InfoType type) {
super(field, parent, name, size);
- switch (type) {
- case INFO:
- image = SVGs.INFO_CIRCLE;
- break;
- case SUCCESS:
- image = SVGs.CHECK_CIRCLE;
- break;
- case WARNING:
- image = SVGs.WARNING;
- break;
- case ERROR:
- image = SVGs.ERROR;
- break;
- }
+ this.type = type;
}
@Override
public void draw(long vg, int x, int y) {
Scissor scissor = ScissorManager.scissor(vg, x, y, size == 1 ? 448 : 960, 32);
- RenderManager.drawSvg(vg, image, x, y + 4, 24, 24);
+ RenderManager.drawInfo(vg, type, x, y + 4, 24);
RenderManager.drawString(vg, name, x + 32, y + 18, OneConfigConfig.WHITE_90, 14, Fonts.MEDIUM);
ScissorManager.resetScissor(vg, scissor);
}