diff options
-rw-r--r-- | src/main/java/io/polyfrost/oneconfig/gui/pages/ModConfigPage.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/main/java/io/polyfrost/oneconfig/gui/pages/ModConfigPage.java b/src/main/java/io/polyfrost/oneconfig/gui/pages/ModConfigPage.java index 9d5dd6e..79e04ff 100644 --- a/src/main/java/io/polyfrost/oneconfig/gui/pages/ModConfigPage.java +++ b/src/main/java/io/polyfrost/oneconfig/gui/pages/ModConfigPage.java @@ -5,7 +5,6 @@ import io.polyfrost.oneconfig.config.data.OptionPage; import io.polyfrost.oneconfig.config.interfaces.BasicOption; import io.polyfrost.oneconfig.lwjgl.RenderManager; import io.polyfrost.oneconfig.lwjgl.font.Fonts; -import org.lwjgl.nanovg.NanoVG; public class ModConfigPage extends Page { private final OptionPage page; @@ -18,15 +17,11 @@ public class ModConfigPage extends Page { @Override public void draw(long vg, int x, int y) { if (page.categories.size() == 0) return; - NanoVG.nvgScissor(vg, x + 14, y, 1056, 800); String selectedCategory = page.categories.keySet().stream().findFirst().get(); int optionX = x + 30; int optionY = y + (page.categories.size() == 1 ? 32 : 72); for (String subCategory : page.categories.get(selectedCategory).keySet()) { - RenderManager.drawString(vg, subCategory, x + 18, optionY, OneConfigConfig.WHITE, 24f, Fonts.INTER_MEDIUM); - optionY += 26; - - int backgroundSize = 32; + int backgroundSize = 48; for (int i = 0; i < page.categories.get(selectedCategory).get(subCategory).size(); i++) { BasicOption option = page.categories.get(selectedCategory).get(subCategory).get(i); if (i + 1 < page.categories.get(selectedCategory).get(subCategory).size()) { @@ -39,9 +34,11 @@ public class ModConfigPage extends Page { } backgroundSize += option.getHeight() + 16; } - RenderManager.drawRoundedRect(vg, x + 14, optionY, 1024, backgroundSize - 16, OneConfigConfig.GRAY_900, 20); + RenderManager.drawRoundedRect(vg, x + 14, optionY, 1024, backgroundSize, OneConfigConfig.GRAY_900, 20); optionY += 16; + RenderManager.drawString(vg, subCategory, x + 18, optionY, OneConfigConfig.WHITE, 24f, Fonts.INTER_MEDIUM); + optionY += 48; for (int i = 0; i < page.categories.get(selectedCategory).get(subCategory).size(); i++) { BasicOption option = page.categories.get(selectedCategory).get(subCategory).get(i); option.draw(vg, optionX, optionY); @@ -58,7 +55,6 @@ public class ModConfigPage extends Page { } optionY += 28; } - NanoVG.nvgResetScissor(vg); } @Override |