aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/gui/elements
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-03-10 23:13:07 +0900
committersyeyoung <cyong06@naver.com>2021-03-10 23:13:07 +0900
commit99a8a9ab3acad6e282b1f50439028f40215fa77d (patch)
tree10c1428524253614bc065bf044e056eb834c0364 /src/main/java/kr/syeyoung/dungeonsguide/gui/elements
parent92ce9024b73df31f3c88ad23a7443dec2578469c (diff)
downloadSkyblock-Dungeons-Guide-99a8a9ab3acad6e282b1f50439028f40215fa77d.tar.gz
Skyblock-Dungeons-Guide-99a8a9ab3acad6e282b1f50439028f40215fa77d.tar.bz2
Skyblock-Dungeons-Guide-99a8a9ab3acad6e282b1f50439028f40215fa77d.zip
actually we don't need it
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/gui/elements')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/gui/elements/MButton.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MColor.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MEditableAColor.java10
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/gui/elements/MLabelAndElement.java2
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/gui/elements/MNavigatingPane.java8
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/gui/elements/MParameter.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPortableColorEdit.java4
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTabbedPane.java6
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTextField.java8
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/gui/elements/MToggleButton.java8
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/gui/elements/MValue.java2
11 files changed, 27 insertions, 27 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MButton.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MButton.java
index 998bb40e..983d571d 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MButton.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MButton.java
@@ -35,7 +35,7 @@ public class MButton extends MPanel {
bg = hover;
}
if (bg != null)
- RenderUtils.drawRectSafe(0,0,getBounds().width, getBounds().height, bg.getRGB());
+ Gui.drawRect(0,0,getBounds().width, getBounds().height, bg.getRGB());
FontRenderer renderer = Minecraft.getMinecraft().fontRendererObj;
int width = renderer.getStringWidth(getText());
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MColor.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MColor.java
index 1bb993aa..de7648c4 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MColor.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MColor.java
@@ -26,6 +26,6 @@ public class MColor extends MPanel {
int x = (rectangle.width - getSize().width) / 2;
int y = (rectangle.height - getSize().height) / 2;
- RenderUtils.drawRectSafe(x,y,x+getSize().width,y+getSize().height, getColor().getRGB());
+ Gui.drawRect(x,y,x+getSize().width,y+getSize().height, getColor().getRGB());
}
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MEditableAColor.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MEditableAColor.java
index 97e93576..7a96264f 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MEditableAColor.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MEditableAColor.java
@@ -45,12 +45,12 @@ public class MEditableAColor extends MPanel {
int x = (rectangle.width - getSize().width) / 2;
int y = (rectangle.height - getSize().height) / 2;
- RenderUtils.drawRectSafe(x,y,x+getSize().width,y+getSize().height, RenderUtils.getColorAt(absMousex - relMousex0, absMousey - relMousey0, color));
+ Gui.drawRect(x,y,x+getSize().width,y+getSize().height, RenderUtils.getColorAt(absMousex - relMousex0, absMousey - relMousey0, color));
- RenderUtils.drawRectSafe(x,y,x+getSize().width,y+1, 0xff333333);
- RenderUtils.drawRectSafe(x,y,x+1,y+getSize().height, 0xff333333);
- RenderUtils.drawRectSafe(x+getSize().width-1,y,x+getSize().width,y+getSize().height, 0xff333333);
- RenderUtils.drawRectSafe(x,y+getSize().height-1,x+getSize().width,y+getSize().height, 0xff333333);
+ Gui.drawRect(x,y,x+getSize().width,y+1, 0xff333333);
+ Gui.drawRect(x,y,x+1,y+getSize().height, 0xff333333);
+ Gui.drawRect(x+getSize().width-1,y,x+getSize().width,y+getSize().height, 0xff333333);
+ Gui.drawRect(x,y+getSize().height-1,x+getSize().width,y+getSize().height, 0xff333333);
}
@Override
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MLabelAndElement.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MLabelAndElement.java
index 8ab6cb6e..c64be9db 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MLabelAndElement.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MLabelAndElement.java
@@ -27,7 +27,7 @@ public class MLabelAndElement extends MPanel {
@Override
public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle scissor) {
if (hover != null && new Rectangle(new Point(0,0),getBounds().getSize()).contains(relMousex0, relMousey0)) {
- RenderUtils.drawRectSafe(0,0,getBounds().width, getBounds().height, hover.getRGB());
+ Gui.drawRect(0,0,getBounds().width, getBounds().height, hover.getRGB());
}
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MNavigatingPane.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MNavigatingPane.java
index b5b6c6ad..d2391cf3 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MNavigatingPane.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MNavigatingPane.java
@@ -61,8 +61,8 @@ public class MNavigatingPane extends MPanel {
@Override
public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle scissor) {
- RenderUtils.drawRectSafe(0, 15, getBounds().width, getBounds().height, 0xFF444444);
- RenderUtils.drawRectSafe(1, 16, getBounds().width-1, getBounds().height-1, background2 != null ? background2.getRGB() : 0);
+ Gui.drawRect(0, 15, getBounds().width, getBounds().height, 0xFF444444);
+ Gui.drawRect(1, 16, getBounds().width-1, getBounds().height-1, background2 != null ? background2.getRGB() : 0);
FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
fr.drawString(currentPage.replace(".", " > "), 20, 20, 0xFFFFFFFF);
@@ -164,9 +164,9 @@ public class MNavigatingPane extends MPanel {
} else if (new Rectangle(new Point(0,0),bounds).contains(relMousex0, relMousey0)) {
bg = hover;
}
- RenderUtils.drawRectSafe(0, tabbedPane.getCurrentPage().equals(address) ? 0 : 2, getBounds().width, getBounds().height, 0xFF444444);
+ Gui.drawRect(0, tabbedPane.getCurrentPage().equals(address) ? 0 : 2, getBounds().width, getBounds().height, 0xFF444444);
if (bg != null)
- RenderUtils.drawRectSafe(1,tabbedPane.getCurrentPage().equals(address) ? 1 : 3,getBounds().width - 1, getBounds().height, bg.getRGB());
+ Gui.drawRect(1,tabbedPane.getCurrentPage().equals(address) ? 1 : 3,getBounds().width - 1, getBounds().height, bg.getRGB());
FontRenderer renderer = Minecraft.getMinecraft().fontRendererObj;
int width = renderer.getStringWidth(text);
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MParameter.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MParameter.java
index 46d26e7f..33be5162 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MParameter.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MParameter.java
@@ -46,7 +46,7 @@ public class MParameter extends MPanel {
@Override
public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle scissor) {
if (hover != null && new Rectangle(new Point(0,0),getBounds().getSize()).contains(relMousex0, relMousey0)) {
- RenderUtils.drawRectSafe(0,0,getBounds().width, getBounds().height, hover.getRGB());
+ Gui.drawRect(0,0,getBounds().width, getBounds().height, hover.getRGB());
}
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPortableColorEdit.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPortableColorEdit.java
index 641d04a7..138846b8 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPortableColorEdit.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPortableColorEdit.java
@@ -71,8 +71,8 @@ public class MPortableColorEdit extends MPanel {
@Override
public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle scissor) {
- RenderUtils.drawRectSafe(0,0,getSize().width,getSize().height, 0xff333333);
- RenderUtils.drawRectSafe(1,1,getSize().width-1,getSize().height-1, 0xffa1a1a1);
+ Gui.drawRect(0,0,getSize().width,getSize().height, 0xff333333);
+ Gui.drawRect(1,1,getSize().width-1,getSize().height-1, 0xffa1a1a1);
int width = getBounds().height- 35;
Tessellator tessellator = Tessellator.getInstance();
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTabbedPane.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTabbedPane.java
index f443342c..dc14264b 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTabbedPane.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTabbedPane.java
@@ -38,7 +38,7 @@ public class MTabbedPane extends MPanel {
@Override
public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle scissor) {
- RenderUtils.drawRectSafe(0, 15, getBounds().width, getBounds().height, 0xFF444444);
+ Gui.drawRect(0, 15, getBounds().width, getBounds().height, 0xFF444444);
}
public void addTab(String tab, MPanel panel) {
@@ -114,9 +114,9 @@ public class MTabbedPane extends MPanel {
} else if (new Rectangle(new Point(0,0),bounds).contains(relMousex0, relMousey0)) {
bg = hover;
}
- RenderUtils.drawRectSafe(0, tabbedPane.getSelectedKey().equals(text) ? 0 : 2, getBounds().width, getBounds().height, 0xFF444444);
+ Gui.drawRect(0, tabbedPane.getSelectedKey().equals(text) ? 0 : 2, getBounds().width, getBounds().height, 0xFF444444);
if (bg != null)
- RenderUtils.drawRectSafe(1,tabbedPane.getSelectedKey().equals(text) ? 1 : 3,getBounds().width - 1, getBounds().height, bg.getRGB());
+ Gui.drawRect(1,tabbedPane.getSelectedKey().equals(text) ? 1 : 3,getBounds().width - 1, getBounds().height, bg.getRGB());
FontRenderer renderer = Minecraft.getMinecraft().fontRendererObj;
int width = renderer.getStringWidth(text);
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTextField.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTextField.java
index 8c5ce1c8..160ad1d6 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTextField.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTextField.java
@@ -43,8 +43,8 @@ public class MTextField extends MPanel {
@Override
public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle clip) {
- RenderUtils.drawRectSafe(0,0,getBounds().width, getBounds().height, isFocused ? Color.white.getRGB() : Color.gray.getRGB());
- RenderUtils.drawRectSafe(1,1,getBounds().width - 1, getBounds().height - 1, Color.black.getRGB());
+ Gui.drawRect(0,0,getBounds().width, getBounds().height, isFocused ? Color.white.getRGB() : Color.gray.getRGB());
+ Gui.drawRect(1,1,getBounds().width - 1, getBounds().height - 1, Color.black.getRGB());
Minecraft mc = Minecraft.getMinecraft();
clip(new ScaledResolution(mc), clip.x + 1, clip.y + 1, clip.width - 2, clip.height - 2);
@@ -56,7 +56,7 @@ public class MTextField extends MPanel {
if (selectionStart != -1) {
int startX = fr.getStringWidth(text.substring(0, selectionStart)) - xOffset;
int endX = fr.getStringWidth(text.substring(0, selectionEnd)) - xOffset;
- RenderUtils.drawRectSafe(3 + startX, y, 3 + endX, y + fr.FONT_HEIGHT, 0xFF00FF00);
+ Gui.drawRect(3 + startX, y, 3 + endX, y + fr.FONT_HEIGHT, 0xFF00FF00);
fr.drawString(text.substring(selectionStart, selectionEnd), 3 + startX, y, foreground.getRGB());
}
@@ -66,7 +66,7 @@ public class MTextField extends MPanel {
int x = fr.getStringWidth(text.substring(0, cursor)) - xOffset;
cursorBlickTicker++;
if (cursorBlickTicker < 10)
- RenderUtils.drawRectSafe(3 + x, y, 4 + x, y + fr.FONT_HEIGHT, 0xFFFFFFFF);
+ Gui.drawRect(3 + x, y, 4 + x, y + fr.FONT_HEIGHT, 0xFFFFFFFF);
if (cursorBlickTicker == 20) cursorBlickTicker = 0;
}
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MToggleButton.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MToggleButton.java
index 8c217231..cb79c2b4 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MToggleButton.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MToggleButton.java
@@ -24,8 +24,8 @@ public class MToggleButton extends MPanel {
int gap = 1;
- RenderUtils.drawRectSafe(0, 0, bounds.width, bounds.height, 0xFF333333);
- RenderUtils.drawRectSafe(gap, gap, bounds.width-gap, bounds.height-gap, 0xFF171717);
+ Gui.drawRect(0, 0, bounds.width, bounds.height, 0xFF333333);
+ Gui.drawRect(gap, gap, bounds.width-gap, bounds.height-gap, 0xFF171717);
FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
@@ -36,14 +36,14 @@ public class MToggleButton extends MPanel {
GlStateManager.scale(1.0/scale,1.0/scale,0);
fr.drawString("ON", x, x, 0xFF9B9B9B);
GlStateManager.popMatrix();
- RenderUtils.drawRectSafe(bounds.width - bounds.height+gap,gap, bounds.width - gap, bounds.height - gap, 0xFF00B200);
+ Gui.drawRect(bounds.width - bounds.height+gap,gap, bounds.width - gap, bounds.height - gap, 0xFF00B200);
} else {
GlStateManager.pushMatrix();
GlStateManager.scale(1.0/scale,1.0/scale,0);
int x = (int) ((scale * bounds.height - fr.FONT_HEIGHT)/2 + gap);
fr.drawString("OFF", (int) (scale * bounds.width - x - fr.getStringWidth("OFF")), x, 0xFF9B9B9B);
GlStateManager.popMatrix();
- RenderUtils.drawRectSafe(gap,gap, bounds.height - gap, bounds.height - gap, 0xFFCD4000);
+ Gui.drawRect(gap,gap, bounds.height - gap, bounds.height - gap, 0xFFCD4000);
}
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MValue.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MValue.java
index a18063c6..b7684789 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MValue.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MValue.java
@@ -38,7 +38,7 @@ public class MValue<T> extends MPanel {
@Override
public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle scissor) {
if (hover != null && new Rectangle(new Point(0,0),getBounds().getSize()).contains(relMousex0, relMousey0)) {
- RenderUtils.drawRectSafe(0,0,getBounds().width, getBounds().height, hover.getRGB());
+ Gui.drawRect(0,0,getBounds().width, getBounds().height, hover.getRGB());
}
}