diff options
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/renderer')
3 files changed, 34 insertions, 7 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/renderer/Image.java b/src/main/java/cc/polyfrost/oneconfig/renderer/Image.java new file mode 100644 index 0000000..fab70a4 --- /dev/null +++ b/src/main/java/cc/polyfrost/oneconfig/renderer/Image.java @@ -0,0 +1,14 @@ +package cc.polyfrost.oneconfig.renderer; + +/** + * Data class storing an image. + * This class is purely a data class, and does not contain any logic. It does not need to be used unless you want to + * differentiate between a String and an image. + */ +public class Image { + public final String filePath; + + public Image(String filePath) { + this.filePath = filePath; + } +} diff --git a/src/main/java/cc/polyfrost/oneconfig/renderer/RenderManager.java b/src/main/java/cc/polyfrost/oneconfig/renderer/RenderManager.java index 5f8ea11..2e44980 100644 --- a/src/main/java/cc/polyfrost/oneconfig/renderer/RenderManager.java +++ b/src/main/java/cc/polyfrost/oneconfig/renderer/RenderManager.java @@ -3,7 +3,6 @@ package cc.polyfrost.oneconfig.renderer; import cc.polyfrost.oneconfig.config.data.InfoType; import cc.polyfrost.oneconfig.gui.OneConfigGui; import cc.polyfrost.oneconfig.internal.assets.Colors; -import cc.polyfrost.oneconfig.internal.assets.Images; import cc.polyfrost.oneconfig.internal.assets.SVGs; import cc.polyfrost.oneconfig.libs.universal.UGraphics; import cc.polyfrost.oneconfig.libs.universal.UResolution; @@ -377,7 +376,7 @@ public final class RenderManager { * * @see RenderManager#drawImage(long, String, float, float, float, float) */ - public static void drawImage(long vg, Images filePath, float x, float y, float width, float height) { + public static void drawImage(long vg, Image filePath, float x, float y, float width, float height) { drawImage(vg, filePath.filePath, x, y, width, height); } @@ -386,7 +385,7 @@ public final class RenderManager { * * @see RenderManager#drawImage(long, String, float, float, float, float, int) */ - public static void drawImage(long vg, Images filePath, float x, float y, float width, float height, int color) { + public static void drawImage(long vg, Image filePath, float x, float y, float width, float height, int color) { drawImage(vg, filePath.filePath, x, y, width, height, color); } @@ -419,7 +418,7 @@ public final class RenderManager { * * @see RenderManager#drawRoundImage(long, String, float, float, float, float, float) */ - public static void drawRoundImage(long vg, Images filePath, float x, float y, float width, float height, float radius) { + public static void drawRoundImage(long vg, Image filePath, float x, float y, float width, float height, float radius) { drawRoundImage(vg, filePath.filePath, x, y, width, height, radius); } @@ -610,7 +609,7 @@ public final class RenderManager { * * @see RenderManager#drawSvg(long, String, float, float, float, float) */ - public static void drawSvg(long vg, SVGs svg, float x, float y, float width, float height) { + public static void drawSvg(long vg, SVG svg, float x, float y, float width, float height) { drawSvg(vg, svg.filePath, x, y, width, height); } @@ -619,7 +618,7 @@ public final class RenderManager { * * @see RenderManager#drawSvg(long, String, float, float, float, float, int) */ - public static void drawSvg(long vg, SVGs svg, float x, float y, float width, float height, int color) { + public static void drawSvg(long vg, SVG svg, float x, float y, float width, float height, int color) { drawSvg(vg, svg.filePath, x, y, width, height, color); } @@ -633,7 +632,7 @@ public final class RenderManager { * @param size The diameter. */ public static void drawInfo(long vg, InfoType type, float x, float y, float size) { - SVGs icon = null; + SVG icon = null; int colorOuter = 0; int colorInner = 0; switch (type) { diff --git a/src/main/java/cc/polyfrost/oneconfig/renderer/SVG.java b/src/main/java/cc/polyfrost/oneconfig/renderer/SVG.java new file mode 100644 index 0000000..0aab043 --- /dev/null +++ b/src/main/java/cc/polyfrost/oneconfig/renderer/SVG.java @@ -0,0 +1,14 @@ +package cc.polyfrost.oneconfig.renderer; + +/** + * Data class storing an SVG image. + * This class is purely a data class, and does not contain any logic. It does not need to be used unless you want to + * differentiate between a String and an SVG image. + */ +public class SVG { + public final String filePath; + + public SVG(String filePath) { + this.filePath = filePath; + } +} |