From 77f8b7924ad61ebb8334d37a0a2ae2c8a297b400 Mon Sep 17 00:00:00 2001 From: nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> Date: Wed, 4 May 2022 18:36:37 +0100 Subject: change some files and start on scrolling --- .../oneconfig/gui/elements/ColorSelector.java | 28 +++++++++++++++++----- .../oneconfig/gui/elements/TextInputField.java | 4 ++-- .../gui/elements/config/ConfigUniSelector.java | 4 ++-- 3 files changed, 26 insertions(+), 10 deletions(-) (limited to 'src/main/java/cc/polyfrost/oneconfig/gui/elements') diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/ColorSelector.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/ColorSelector.java index 83d0f7c..fcd96b2 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/ColorSelector.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/ColorSelector.java @@ -9,6 +9,22 @@ import java.awt.*; import java.util.ArrayList; public class ColorSelector { + + public ColorSelector(Color color, int mouseX, int mouseY) { + + } + + public void draw(long vg) { + + } + + public Color getColor() { + + return null; + } +} + +/*public class ColorSelector { private Color color; private final int x, y; private final int width = 416; @@ -147,7 +163,7 @@ public class ColorSelector { public abstract void drawBox(long vg, int x, int y); /** draw the color selector contents, including the box, and the input fields. If it is clicked, getColorAtPos is called. updateElements is also called to update all the input fields. */ - public void draw(long vg, int x, int y) { + /*public void draw(long vg, int x, int y) { drawBox(vg, x + 16, y + 120); if(InputUtils.isAreaHovered(x + 16, y + 120, 384, 288) && Mouse.isButtonDown(0)) { selectedX = InputUtils.mouseX() - x - 16; @@ -170,18 +186,18 @@ public class ColorSelector { RenderManager.drawRoundedRect(vg, x + 16, y + 488, 384, 40, color1.getRGB(), 12f); } - /** called to set the color of the color selector box based on the values of the input fields. */ + /** called to set the color of the color selector box based on the values of the input fields. */ /* public abstract void setColor(Color color); - /** return an array of two ints of the start color of the gradient and the end color of the gradient. */ + /** return an array of two ints of the start color of the gradient and the end color of the gradient. */ /* public abstract int[] drawTopSlider(); - /** return an array of two ints of the start color of the gradient and the end color of the gradient. */ + /** return an array of two ints of the start color of the gradient and the end color of the gradient. */ /* public abstract int[] drawBottomSlider(); /** * This method is called when the color selector is clicked. It needs to return color at the clicked position. * @return color at the clicked position as a float[] rgba. - */ + */ /* public abstract float[] getColorAtPos(int clickX, int clickY); public float getRed() { @@ -246,5 +262,5 @@ public class ColorSelector { } } } - +*/ diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/TextInputField.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/TextInputField.java index 3058643..196c447 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/TextInputField.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/TextInputField.java @@ -2,8 +2,8 @@ package cc.polyfrost.oneconfig.gui.elements; import cc.polyfrost.oneconfig.config.OneConfigConfig; import cc.polyfrost.oneconfig.lwjgl.RenderManager; -import cc.polyfrost.oneconfig.lwjgl.Scissor; -import cc.polyfrost.oneconfig.lwjgl.ScissorManager; +import cc.polyfrost.oneconfig.lwjgl.scissor.Scissor; +import cc.polyfrost.oneconfig.lwjgl.scissor.ScissorManager; import cc.polyfrost.oneconfig.lwjgl.font.Fonts; import cc.polyfrost.oneconfig.utils.InputUtils; import net.minecraft.client.gui.GuiScreen; 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 0623f1e..5fad0a4 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 @@ -3,8 +3,8 @@ package cc.polyfrost.oneconfig.gui.elements.config; import cc.polyfrost.oneconfig.config.OneConfigConfig; import cc.polyfrost.oneconfig.config.interfaces.BasicOption; import cc.polyfrost.oneconfig.lwjgl.RenderManager; -import cc.polyfrost.oneconfig.lwjgl.Scissor; -import cc.polyfrost.oneconfig.lwjgl.ScissorManager; +import cc.polyfrost.oneconfig.lwjgl.scissor.Scissor; +import cc.polyfrost.oneconfig.lwjgl.scissor.ScissorManager; import cc.polyfrost.oneconfig.lwjgl.font.Fonts; import cc.polyfrost.oneconfig.lwjgl.image.Images; import cc.polyfrost.oneconfig.utils.InputUtils; -- cgit