aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MButton.java
diff options
context:
space:
mode:
authorsyeyoung <42869671+cyoung06@users.noreply.github.com>2020-11-23 22:49:14 +0900
committersyeyoung <42869671+cyoung06@users.noreply.github.com>2020-11-23 22:49:14 +0900
commit2a3780613676a2cd9fe912cbcce00c640463d67d (patch)
tree47d72cacc0d1b50fe08fc3bcc63a5425f1347691 /src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MButton.java
parent8292e2b632d34a92f98e8dd896750b5b5ab011bd (diff)
downloadSkyblock-Dungeons-Guide-2a3780613676a2cd9fe912cbcce00c640463d67d.tar.gz
Skyblock-Dungeons-Guide-2a3780613676a2cd9fe912cbcce00c640463d67d.tar.bz2
Skyblock-Dungeons-Guide-2a3780613676a2cd9fe912cbcce00c640463d67d.zip
gui elements, better clip
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MButton.java')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MButton.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MButton.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MButton.java
index e6c675ca..430ca07f 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MButton.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MButton.java
@@ -5,6 +5,7 @@ import lombok.Getter;
import lombok.Setter;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.Gui;
import org.lwjgl.opengl.GL11;
import org.w3c.dom.css.Rect;
@@ -33,7 +34,7 @@ public class MButton extends MPanel {
} else if (new Rectangle(new Point(0,0),bounds).contains(relMousex0, relMousey0)) {
bg = hover;
}
- GL11.glClearColor(bg.getRed(), bg.getGreen(), bg.getBlue(), bg.getAlpha());
+ Gui.drawRect(0,0,bounds.width, bounds.height, bg.getRGB());
FontRenderer renderer = Minecraft.getMinecraft().fontRendererObj;
int width = renderer.getStringWidth(text);