aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc
diff options
context:
space:
mode:
authorDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-05-08 12:44:55 +0200
committerDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-05-08 12:44:55 +0200
commit52cf361a6c41af1a9124cb8cbb6e319c4e8e3721 (patch)
tree8028467a7ba6704a15abf7a29ece9b0b947facad /src/main/java/cc
parent61270ec07f13e33e7c8fd140c02f826322097676 (diff)
downloadOneConfig-52cf361a6c41af1a9124cb8cbb6e319c4e8e3721.tar.gz
OneConfig-52cf361a6c41af1a9124cb8cbb6e319c4e8e3721.tar.bz2
OneConfig-52cf361a6c41af1a9124cb8cbb6e319c4e8e3721.zip
negative
Diffstat (limited to 'src/main/java/cc')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java5
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigDropdown.java14
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigUniSelector.java6
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/elements/text/NumberInputField.java5
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java2
5 files changed, 8 insertions, 24 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java b/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
index d084186..240a4db 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
@@ -87,10 +87,7 @@ public class OneConfigGui extends GuiScreen {
backArrow.disable(false);
if (!backArrow.isHovered() || Mouse.isButtonDown(0)) NanoVG.nvgGlobalAlpha(vg, 0.8f);
}
- NanoVG.nvgTranslate(vg, x + 271, y + 47);
- NanoVG.nvgRotate(vg, (float) Math.toRadians(180));
- RenderManager.drawImage(vg, Images.CIRCLE_ARROW, 0, 0, 22, 22);
- NanoVG.nvgResetTransform(vg);
+ RenderManager.drawImage(vg, Images.CIRCLE_ARROW, x + 271, y + 25, -22, 22);
NanoVG.nvgGlobalAlpha(vg, 1f);
if (nextPages.size() == 0) {
forwardArrow.disable(true);
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigDropdown.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigDropdown.java
index b46d2eb..64753d2 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigDropdown.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigDropdown.java
@@ -53,17 +53,14 @@ public class ConfigDropdown extends BasicOption { // TODO: chose where dividers
RenderManager.drawString(vg, options[selected], x + 236, y + 16, OneConfigConfig.WHITE_80, 14f, Fonts.MEDIUM);
RenderManager.drawRoundedRect(vg, x + 452, y + 4, 24, 24, OneConfigConfig.BLUE_600, 8);
RenderManager.drawImage(vg, Images.DROPDOWN_ARROW, x + 459, y + 8, 10, 6);
- NanoVG.nvgTranslate(vg, x + 469, y + 24);
+ RenderManager.drawImage(vg, Images.DROPDOWN_ARROW, x + 459, y + 24, 10, -6);
} else {
RenderManager.drawRoundedRect(vg, x + 352, y, 640, 32, backgroundColor, 12);
RenderManager.drawString(vg, options[selected], x + 364, y + 16, OneConfigConfig.WHITE_80, 14f, Fonts.MEDIUM);
RenderManager.drawRoundedRect(vg, x + 964, y + 4, 24, 24, OneConfigConfig.BLUE_600, 8);
RenderManager.drawImage(vg, Images.DROPDOWN_ARROW, x + 971, y + 8, 10, 6);
- NanoVG.nvgTranslate(vg, x + 981, y + 24);
+ RenderManager.drawImage(vg, Images.DROPDOWN_ARROW, x + 971, y + 24, 10, -6);
}
- NanoVG.nvgRotate(vg, (float) Math.toRadians(180));
- RenderManager.drawImage(vg, Images.DROPDOWN_ARROW, 0, 0, 10, 6);
- NanoVG.nvgResetTransform(vg);
NanoVG.nvgGlobalAlpha(vg, 1f);
}
@@ -117,7 +114,7 @@ public class ConfigDropdown extends BasicOption { // TODO: chose where dividers
if (hovered && Mouse.isButtonDown(0)) NanoVG.nvgGlobalAlpha(vg, 0.8f);
RenderManager.drawRoundedRect(vg, x + 452, y + 4, 24, 24, OneConfigConfig.BLUE_600, 8);
RenderManager.drawImage(vg, Images.DROPDOWN_ARROW, x + 459, y + 8, 10, 6);
- NanoVG.nvgTranslate(vg, x + 469, y + 24);
+ RenderManager.drawImage(vg, Images.DROPDOWN_ARROW, x + 459, y + 24, 10, -6);
} else {
RenderManager.drawRoundedRect(vg, x + 352, y, 640, 32, backgroundColor, 12);
RenderManager.drawString(vg, options[selected], x + 364, y + 16, OneConfigConfig.WHITE_80, 14f, Fonts.MEDIUM);
@@ -152,11 +149,8 @@ public class ConfigDropdown extends BasicOption { // TODO: chose where dividers
if (hovered && Mouse.isButtonDown(0)) NanoVG.nvgGlobalAlpha(vg, 0.8f);
RenderManager.drawRoundedRect(vg, x + 964, y + 4, 24, 24, OneConfigConfig.BLUE_600, 8);
RenderManager.drawImage(vg, Images.DROPDOWN_ARROW, x + 971, y + 8, 10, 6);
- NanoVG.nvgTranslate(vg, x + 981, y + 24);
+ RenderManager.drawImage(vg, Images.DROPDOWN_ARROW, x + 971, y + 24, 10, -6);
}
- NanoVG.nvgRotate(vg, (float) Math.toRadians(180));
- RenderManager.drawImage(vg, Images.DROPDOWN_ARROW, 0, 0, 10, 6);
- NanoVG.nvgResetTransform(vg);
NanoVG.nvgGlobalAlpha(vg, 1f);
}
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigUniSelector.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigUniSelector.java
index 48967d6..d6acf52 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigUniSelector.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/config/ConfigUniSelector.java
@@ -48,11 +48,7 @@ public class ConfigUniSelector extends BasicOption {
}
ScissorManager.resetScissor(vg, scissor);
- // actual coordinates: 240, 7
- NanoVG.nvgTranslate(vg, x + 248, y + 21);
- NanoVG.nvgRotate(vg, (float) Math.toRadians(180));
- RenderManager.drawImage(vg, Images.CHEVRON_ARROW, 0, 0, 8, 14, OneConfigConfig.BLUE_400);
- NanoVG.nvgResetTransform(vg);
+ RenderManager.drawImage(vg, Images.CHEVRON_ARROW, x + 248, y + 7, -8, 14, OneConfigConfig.BLUE_400);
RenderManager.drawImage(vg, Images.CHEVRON_ARROW, x + 456, y + 7, 8, 14, OneConfigConfig.BLUE_400);
if (InputUtils.isAreaClicked(x + 235, y + 5, 18, 18) && selected > 0) {
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/text/NumberInputField.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/text/NumberInputField.java
index 5475a55..655900a 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/text/NumberInputField.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/text/NumberInputField.java
@@ -71,10 +71,7 @@ public class NumberInputField extends TextInputField {
downArrow.disable(true);
}
RenderManager.drawRoundedRectVaried(vg, x + width + 4, y + 14, 12, 14, colorBottom, 0f, 0f, 6f, 6f);
- NanoVG.nvgTranslate(vg, x + width + 15, y + 25);
- NanoVG.nvgRotate(vg, (float) Math.toRadians(180));
- RenderManager.drawImage(vg, Images.UP_ARROW, 0, 0, 10, 10);
- NanoVG.nvgResetTransform(vg);
+ RenderManager.drawImage(vg, Images.UP_ARROW, x + width + 5, y + 25, 10, -10);
NanoVG.nvgGlobalAlpha(vg, 1f);
try {
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java b/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java
index 8e3917d..9b50d19 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java
@@ -6,9 +6,9 @@ import cc.polyfrost.oneconfig.config.data.Mod;
import cc.polyfrost.oneconfig.config.data.ModType;
import cc.polyfrost.oneconfig.gui.OneConfigGui;
import cc.polyfrost.oneconfig.gui.elements.BasicButton;
-import cc.polyfrost.oneconfig.lwjgl.font.Fonts;
import cc.polyfrost.oneconfig.gui.elements.ModCard;
import cc.polyfrost.oneconfig.lwjgl.RenderManager;
+import cc.polyfrost.oneconfig.lwjgl.font.Fonts;
import java.util.ArrayList;
import java.util.List;