From 63192472f7a814725cbcdaf91eed1361bfc75c38 Mon Sep 17 00:00:00 2001 From: nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> Date: Mon, 2 May 2022 13:22:59 +0100 Subject: start on color selector (my brain hurts) --- .../java/io/polyfrost/oneconfig/lwjgl/RenderManager.java | 12 ++++++++++++ src/main/java/io/polyfrost/oneconfig/lwjgl/image/Images.java | 5 +++++ 2 files changed, 17 insertions(+) (limited to 'src/main/java/io/polyfrost/oneconfig/lwjgl') diff --git a/src/main/java/io/polyfrost/oneconfig/lwjgl/RenderManager.java b/src/main/java/io/polyfrost/oneconfig/lwjgl/RenderManager.java index c14ca89..2bc09df 100644 --- a/src/main/java/io/polyfrost/oneconfig/lwjgl/RenderManager.java +++ b/src/main/java/io/polyfrost/oneconfig/lwjgl/RenderManager.java @@ -157,6 +157,18 @@ public final class RenderManager { nvgColor.free(); } + public static void drawString(long vg, String text, float x, float y, int color, float size, int lineHeight, Fonts font) { + nvgBeginPath(vg); + nvgFontSize(vg, size); + nvgFontFace(vg, font.font.getName()); + nvgTextAlign(vg, NVG_ALIGN_LEFT | NVG_ALIGN_TOP); + nvgTextLineHeight(vg, lineHeight); + NVGColor nvgColor = color(vg, color); + nvgText(vg, x, y, text); + nvgFill(vg); + nvgColor.free(); + } + public static void drawWrappedString(long vg, String text, float x, float y, float width, int color, float size, Fonts font) { nvgBeginPath(vg); nvgFontSize(vg, size); diff --git a/src/main/java/io/polyfrost/oneconfig/lwjgl/image/Images.java b/src/main/java/io/polyfrost/oneconfig/lwjgl/image/Images.java index e09cec3..cdd79e3 100644 --- a/src/main/java/io/polyfrost/oneconfig/lwjgl/image/Images.java +++ b/src/main/java/io/polyfrost/oneconfig/lwjgl/image/Images.java @@ -4,13 +4,18 @@ public enum Images { CHEVRON_ARROW("/assets/oneconfig/textures/gui/general/arrows/chevron.png"), DROPDOWN_ARROW("/assets/oneconfig/textures/gui/general/arrows/dropdown_arrow.png"), UP_ARROW("/assets/oneconfig/textures/gui/general/arrows/up_arrow.png"), + ARROW_RIGHT("/assets/oneconfig/textures/gui/general/arrows/arrow_right.png"), + ARROW_LEFT("/assets/oneconfig/textures/gui/general/arrows/arrow_left.png"), CHECKMARK("/assets/oneconfig/textures/gui/general/configs/checkmark.png"), FAVORITE("/assets/oneconfig/textures/gui/general/configs/favorite_active.png"), FAVORITE_OFF("/assets/oneconfig/textures/gui/general/configs/favorite_inactive.png"), HIDE_EYE("/assets/oneconfig/textures/gui/general/configs/hide_eye.png"), + HIDE_EYE_OFF("/assets/oneconfig/textures/gui/general/configs/hide_eye_off.png"), // TODO color picker ones + COLOR_BASE("/assets/oneconfig/textures/gui/general/color/color_base.png"), + SHARE("/assets/oneconfig/textures/gui/general/nav/share.png"), LAUNCH("/assets/oneconfig/textures/gui/general/nav/launch.png"), -- cgit