aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/gui/elements/config
diff options
context:
space:
mode:
authorDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-05-15 20:29:49 +0200
committerDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-05-15 20:29:49 +0200
commit9521fb420ad494a9cbe0d3c439976fc842fa9194 (patch)
tree3bb55b01d7356f0c26c7991c574b675e481db6c7 /src/main/java/cc/polyfrost/oneconfig/gui/elements/config
parentcb2f7c41420734142ec93fb66e1dfaac0944bcff (diff)
downloadOneConfig-9521fb420ad494a9cbe0d3c439976fc842fa9194.tar.gz
OneConfig-9521fb420ad494a9cbe0d3c439976fc842fa9194.tar.bz2
OneConfig-9521fb420ad494a9cbe0d3c439976fc842fa9194.zip
new scaling logic and also some other stuff
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);
}