aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/lwjgl
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/lwjgl')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/lwjgl/RenderManager.java11
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/lwjgl/image/Images.java6
2 files changed, 9 insertions, 8 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/lwjgl/RenderManager.java b/src/main/java/cc/polyfrost/oneconfig/lwjgl/RenderManager.java
index b596e0c..5f18e5f 100644
--- a/src/main/java/cc/polyfrost/oneconfig/lwjgl/RenderManager.java
+++ b/src/main/java/cc/polyfrost/oneconfig/lwjgl/RenderManager.java
@@ -15,14 +15,8 @@ import org.lwjgl.nanovg.NVGColor;
import org.lwjgl.nanovg.NVGPaint;
import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.GL11;
-import sun.font.Font2D;
-import sun.font.FontManagerFactory;
-import sun.font.StrikeMetrics;
-import sun.font.TrueTypeFont;
import java.awt.*;
-import java.io.File;
-import java.util.Arrays;
import java.util.function.LongConsumer;
import static org.lwjgl.nanovg.NanoVG.*;
@@ -87,7 +81,7 @@ public final class RenderManager {
nvgRoundedRect(vg, x, y, width, height, radius);
NVGColor nvgColor = color(vg, color);
NVGColor nvgColor2 = color(vg, color2);
- nvgFillPaint(vg, nvgLinearGradient(vg, x, y + height, x + width, y, nvgColor, nvgColor2, bg));
+ nvgFillPaint(vg, nvgLinearGradient(vg, x, y, x + width, y, nvgColor, nvgColor2, bg));
nvgFill(vg);
nvgColor.free();
nvgColor2.free();
@@ -99,7 +93,7 @@ public final class RenderManager {
nvgRect(vg, x, y, width, height);
NVGColor nvgColor = color(vg, color);
NVGColor nvgColor2 = color(vg, color2);
- nvgFillPaint(vg, nvgLinearGradient(vg, x + height, y + height, x + height, y, nvgColor, nvgColor2, bg));
+ nvgFillPaint(vg, nvgLinearGradient(vg, x, y, x, y + width, nvgColor, nvgColor2, bg));
nvgFillPaint(vg, bg);
nvgFill(vg);
nvgColor.free();
@@ -191,6 +185,7 @@ public final class RenderManager {
NVGPaint imagePaint = NVGPaint.calloc();
cc.polyfrost.oneconfig.lwjgl.image.Image image = ImageLoader.INSTANCE.getImage(filePath);
nvgBeginPath(vg);
+
nvgImagePattern(vg, x, y, width, height, 0, image.getReference(), 1, imagePaint);
nvgRect(vg, x, y, width, height);
nvgFillPaint(vg, imagePaint);
diff --git a/src/main/java/cc/polyfrost/oneconfig/lwjgl/image/Images.java b/src/main/java/cc/polyfrost/oneconfig/lwjgl/image/Images.java
index f5e4213..370b4f0 100644
--- a/src/main/java/cc/polyfrost/oneconfig/lwjgl/image/Images.java
+++ b/src/main/java/cc/polyfrost/oneconfig/lwjgl/image/Images.java
@@ -14,6 +14,9 @@ public enum Images {
// TODO color picker ones
COLOR_BASE("/assets/oneconfig/textures/gui/general/color/color_base.png"),
+ COLOR_BASE_LONG("/assets/oneconfig/textures/gui/general/color/color_base_long.png"),
+ COLOR_BASE_LARGE("/assets/oneconfig/textures/gui/general/color/color_base_large.png"),
+ COLOR_WHEEL("/assets/oneconfig/textures/gui/general/color/color_wheel.png"),
SHARE("/assets/oneconfig/textures/gui/general/nav/share.png"),
@@ -21,6 +24,9 @@ public enum Images {
SEARCH("/assets/oneconfig/textures/gui/general/nav/search.png"),
MINIMIZE("/assets/oneconfig/textures/gui/general/nav/minimize.png"),
CLOSE("/assets/oneconfig/textures/gui/general/nav/close.png"),
+ HELP("/assets/oneconfig/textures/gui/general/nav/help.png"),
+ COPY("/assets/oneconfig/textures/gui/general/nav/copy.png"),
+ PASTE("/assets/oneconfig/textures/gui/general/nav/paste.png"),
LOGO("/assets/oneconfig/textures/gui/general/logo.png"),