aboutsummaryrefslogtreecommitdiff
path: root/src/main
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
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')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MFeature.java8
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MParameter.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/PanelDelegate.java19
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureChestPrice.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureTerminalSolvers.java4
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java6
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java51
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java10
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/text/StyledTextRenderer.java2
-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
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java12
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionTreeDisplayPane.java4
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomDataDisplayPane.java10
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomMatchDisplayPane.java8
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorBlazeSolver.java2
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java37
26 files changed, 90 insertions, 141 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MFeature.java b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MFeature.java
index f7d696e7..fa6f2312 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MFeature.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MFeature.java
@@ -81,13 +81,13 @@ public class MFeature extends MPanel {
@Override
public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle scissor) {
- RenderUtils.drawRectSafe(0,0,getBounds().width, getBounds().height,0xFF444444);
+ Gui.drawRect(0,0,getBounds().width, getBounds().height,0xFF444444);
if (hover != null && new Rectangle(new Point(0,0),getBounds().getSize()).contains(relMousex0, relMousey0)) {
- RenderUtils.drawRectSafe(1,18,getBounds().width -1, getBounds().height-1, hover.getRGB());
+ Gui.drawRect(1,18,getBounds().width -1, getBounds().height-1, hover.getRGB());
} else {
- RenderUtils.drawRectSafe(1,18,getBounds().width -1, getBounds().height-1, 0xFF545454);
+ Gui.drawRect(1,18,getBounds().width -1, getBounds().height-1, 0xFF545454);
}
- RenderUtils.drawRectSafe(0,17,getBounds().width, 18,0xFF444444);
+ Gui.drawRect(0,17,getBounds().width, 18,0xFF444444);
FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MParameter.java b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MParameter.java
index f7572c30..f9913f00 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MParameter.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/MParameter.java
@@ -104,7 +104,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/config/guiconfig/PanelDelegate.java b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/PanelDelegate.java
index c02f04b8..23da3206 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/PanelDelegate.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/PanelDelegate.java
@@ -31,23 +31,24 @@ public class PanelDelegate extends MPanel {
GlStateManager.popMatrix();
if (!draggable) return;
- RenderUtils.drawRectSafe(0,0, 3, 3, 0xFFBBBBBB);
- RenderUtils.drawRectSafe(0, getBounds().height - 3, 3, getBounds().height, 0xFFBBBBBB);
- RenderUtils.drawRectSafe(getBounds().width - 3,0, getBounds().width, 3, 0xFFBBBBBB);
- RenderUtils.drawRectSafe(getBounds().width - 3,getBounds().height - 3, getBounds().width, getBounds().height, 0xFFBBBBBB);
+ Gui.drawRect(0,0, 3, 3, 0xFFBBBBBB);
+ Gui.drawRect(0, getBounds().height - 3, 3, getBounds().height, 0xFFBBBBBB);
+ Gui.drawRect(getBounds().width - 3,0, getBounds().width, 3, 0xFFBBBBBB);
+ Gui.drawRect(getBounds().width - 3,getBounds().height - 3, getBounds().width, getBounds().height, 0xFFBBBBBB);
if (lastAbsClip.contains(absMousex, absMousey)) {
if (relMouseX < 3 && relMouseY < 3) {
- RenderUtils.drawRectSafe(0,0, 3, 3, 0x55FFFFFF);
+ Gui.drawRect(0,0, 3, 3, 0x55FFFFFF);
} else if (relMouseX < 3 && relMouseY > getBounds().height - 3) {
- RenderUtils.drawRectSafe(0, getBounds().height - 3, 3, getBounds().height, 0x55FFFFFF);
+ Gui.drawRect(0, getBounds().height - 3, 3, getBounds().height, 0x55FFFFFF);
} else if (relMouseX > getBounds().width - 3 && relMouseY > getBounds().height - 3) {
- RenderUtils.drawRectSafe(getBounds().width - 3,getBounds().height - 3, getBounds().width, getBounds().height, 0x55FFFFFF);
+ Gui.drawRect(getBounds().width - 3,getBounds().height - 3, getBounds().width, getBounds().height, 0x55FFFFFF);
} else if (relMouseX > getBounds().width - 3 && relMouseY < 3) {
- RenderUtils.drawRectSafe(getBounds().width - 3,0, getBounds().width, 3, 0x55FFFFFF);
+ Gui.drawRect(getBounds().width - 3,0, getBounds().width, 3, 0x55FFFFFF);
} else if (selectedPart == -2){
- RenderUtils.drawRectSafe(0,0, getBounds().width, getBounds().height, 0x55FFFFFF);
+ Gui.drawRect(0,0, getBounds().width, getBounds().height, 0x55FFFFFF);
}
}
+ GlStateManager.enableBlend();
}
private int selectedPart = -2;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureChestPrice.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureChestPrice.java
index 5aa8fb4d..15e210c4 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureChestPrice.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureChestPrice.java
@@ -78,7 +78,7 @@ public class FeatureChestPrice extends SimpleFeature implements GuiBackgroundRen
GlStateManager.pushMatrix();
GlStateManager.translate(left, top, 0);
- RenderUtils.drawRectSafe( 0,0,width, 30, 0xFFDDDDDD);
+ Gui.drawRect( 0,0,width, 30, 0xFFDDDDDD);
FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
fr.drawString("BIN/AH Price: ", 5,5, 0xFF000000);
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureTerminalSolvers.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureTerminalSolvers.java
index 1a686b42..d792a07c 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureTerminalSolvers.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureTerminalSolvers.java
@@ -95,14 +95,14 @@ public class FeatureTerminalSolvers extends SimpleFeature implements GuiOpenList
for (Slot currSlot : solution.getCurrSlots()) {
int x = currSlot.xDisplayPosition;
int y = currSlot.yDisplayPosition;
- RenderUtils.drawRectSafe(x, y, x + 16, y + 16, 0x7700FFFF);
+ Gui.drawRect(x, y, x + 16, y + 16, 0x7700FFFF);
}
}
if (solution.getNextSlots() != null) {
for (Slot nextSlot : solution.getNextSlots()) {
int x = nextSlot.xDisplayPosition;
int y = nextSlot.yDisplayPosition;
- RenderUtils.drawRectSafe(x, y, x + 16, y + 16, 0x77FFFF00);
+ Gui.drawRect(x, y, x + 16, y + 16, 0x77FFFF00);
}
}
GlStateManager.colorMask(true, true, true, true);
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java
index 2291a0e8..a14b9c99 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java
@@ -111,11 +111,11 @@ public class FeatureDungeonMap extends GuiFeature implements DungeonEndListener,
MapProcessor mapProcessor = context.getMapProcessor();
MapData mapData = mapProcessor.getLastMapData2();
Rectangle featureRect =getFeatureRect().getRectangle();
- RenderUtils.drawRectSafe(0,0,featureRect.width, featureRect.height, RenderUtils.getColorAt(featureRect.x, featureRect.y, this.<AColor>getParameter("background_color").getValue()));
+ Gui.drawRect(0,0,featureRect.width, featureRect.height, RenderUtils.getColorAt(featureRect.x, featureRect.y, this.<AColor>getParameter("background_color").getValue()));
GlStateManager.color(1,1,1,1);
GlStateManager.pushMatrix();;
if (mapData == null) {
- RenderUtils.drawRectSafe(0,0,featureRect.width, featureRect.height, 0xFFFF0000);
+ Gui.drawRect(0,0,featureRect.width, featureRect.height, 0xFFFF0000);
} else {
renderMap(partialTicks,mapProcessor,mapData,context);
}
@@ -131,7 +131,7 @@ public class FeatureDungeonMap extends GuiFeature implements DungeonEndListener,
return;
}
Rectangle featureRect =getFeatureRect().getRectangle();
- RenderUtils.drawRectSafe(0,0,featureRect.width, featureRect.height, RenderUtils.getColorAt(featureRect.x, featureRect.y, this.<AColor>getParameter("background_color").getValue()));
+ Gui.drawRect(0,0,featureRect.width, featureRect.height, RenderUtils.getColorAt(featureRect.x, featureRect.y, this.<AColor>getParameter("background_color").getValue()));
FontRenderer fr = getFontRenderer();
fr.drawString("Please join a dungeon to see preview", featureRect.width / 2 - fr.getStringWidth("Please join a dungeon to see preview") / 2, featureRect.height / 2 - fr.FONT_HEIGHT / 2, 0xFFFFFFFF);
GL11.glLineWidth(2);
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java
index c5779e2c..898c7105 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java
@@ -22,10 +22,7 @@ import kr.syeyoung.dungeonsguide.roomprocessor.GeneralRoomProcessor;
import kr.syeyoung.dungeonsguide.utils.RenderUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
-import net.minecraft.client.gui.FontRenderer;
-import net.minecraft.client.gui.Gui;
-import net.minecraft.client.gui.GuiIngameMenu;
-import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.gui.*;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.util.MathHelper;
@@ -75,8 +72,8 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
Rectangle feature = getFeatureRect().getRectangle();
FontRenderer fr = getFontRenderer();
- RenderUtils.drawRectSafe(0, 0, feature.width, fr.FONT_HEIGHT + 4, 0xFF444444);
- RenderUtils.drawRectSafe(1, 1, feature.width - 1, fr.FONT_HEIGHT + 3, 0xFF262626);
+ Gui.drawRect(0, 0, feature.width, fr.FONT_HEIGHT + 4, 0xFF444444);
+ Gui.drawRect(1, 1, feature.width - 1, fr.FONT_HEIGHT + 3, 0xFF262626);
fr.drawString("Selected: ", 2,2, 0xFFAAAAAA);
if (grp.getPath() == null)
fr.drawString("Nothing", fr.getStringWidth("Selected: ") + 2,2, 0xFFAA0000);
@@ -92,8 +89,8 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
Rectangle feature = getFeatureRect().getRectangle();
FontRenderer fr = getFontRenderer();
- RenderUtils.drawRectSafe(0, 0, feature.width, fr.FONT_HEIGHT + 4, 0xFF444444);
- RenderUtils.drawRectSafe(1, 1, feature.width - 1, fr.FONT_HEIGHT + 3, 0xFF262626);
+ Gui.drawRect(0, 0, feature.width, fr.FONT_HEIGHT + 4, 0xFF444444);
+ Gui.drawRect(1, 1, feature.width - 1, fr.FONT_HEIGHT + 3, 0xFF262626);
fr.drawString("Selected: ", 2,2, 0xFFAAAAAA);
fr.drawString("Nothing", fr.getStringWidth("Selected: ") + 2,2, 0xFFAA0000);
fr.drawString("Open any gui to browse", 2, fr.FONT_HEIGHT + 5, 0xFFAAAAAA);
@@ -102,14 +99,7 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
@Override
public void onGuiPreRender(GuiScreenEvent.DrawScreenEvent.Pre rendered) {
if (!isEnabled()) return;
- if (Minecraft.getMinecraft().currentScreen instanceof GuiGuiLocationConfig
- || Minecraft.getMinecraft().currentScreen instanceof GuiConfig
- || Minecraft.getMinecraft().currentScreen instanceof GuiDungeonRoomEdit
- || Minecraft.getMinecraft().currentScreen instanceof GuiDungeonAddSet
- || Minecraft.getMinecraft().currentScreen instanceof GuiDungeonParameterEdit
- || Minecraft.getMinecraft().currentScreen instanceof GuiDungeonValueEdit
- || Minecraft.getMinecraft().currentScreen instanceof GuiContainer
- || Minecraft.getMinecraft().currentScreen instanceof GuiIngameMenu) return;
+ if (!(Minecraft.getMinecraft().currentScreen instanceof GuiChat)) return;
if (!skyblockStatus.isOnDungeon()) return;
if (skyblockStatus.getContext() == null || !skyblockStatus.getContext().getMapProcessor().isInitialized()) return;
@@ -132,8 +122,8 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
Rectangle feature = getFeatureRect().getRectangle();
FontRenderer fr = getFontRenderer();
GlStateManager.translate(feature.x, feature.y, 0);
- RenderUtils.drawRectSafe(0, 0, feature.width, fr.FONT_HEIGHT + 4, 0xFF444444);
- RenderUtils.drawRectSafe(1, 1, feature.width - 1, fr.FONT_HEIGHT + 3, 0xFF262626);
+ Gui.drawRect(0, 0, feature.width, fr.FONT_HEIGHT + 4, 0xFF444444);
+ Gui.drawRect(1, 1, feature.width - 1, fr.FONT_HEIGHT + 3, 0xFF262626);
fr.drawString("Selected: ", 2,2, 0xFFAAAAAA);
if (grp.getPath() == null)
fr.drawString("Nothing", fr.getStringWidth("Selected: ") + 2,2, 0xFFAA0000);
@@ -142,8 +132,8 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
fr.drawString(route.getMechanic()+" -> "+route.getState(), fr.getStringWidth("Selected: ") + 2,2, 0xFFFFFF00);
}
GlStateManager.translate(0, fr.FONT_HEIGHT + 4, 0);
- RenderUtils.drawRectSafe(0, 0, feature.width, feature.height - fr.FONT_HEIGHT - 4, 0xFF444444);
- RenderUtils.drawRectSafe(1, 1, feature.width - 1,feature.height - fr.FONT_HEIGHT - 5, 0xFF262626);
+ Gui.drawRect(0, 0, feature.width, feature.height - fr.FONT_HEIGHT - 4, 0xFF444444);
+ Gui.drawRect(1, 1, feature.width - 1,feature.height - fr.FONT_HEIGHT - 5, 0xFF262626);
clip(new ScaledResolution(Minecraft.getMinecraft()), feature.x, feature.y + fr.FONT_HEIGHT + 5, feature.width , feature.height - fr.FONT_HEIGHT - 6);
GL11.glEnable(GL11.GL_SCISSOR_TEST);
GlStateManager.translate(0, -dy, 0);
@@ -154,9 +144,9 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
for (int i = 0; i < sortedMechanics.size(); i++) {
Object obj = sortedMechanics.get(i);
if (selected == i) {
- RenderUtils.drawRectSafe(-1, i * fr.FONT_HEIGHT, feature.width - 3, i * fr.FONT_HEIGHT + fr.FONT_HEIGHT - 1, 0xFF444444);
+ Gui.drawRect(-1, i * fr.FONT_HEIGHT, feature.width - 3, i * fr.FONT_HEIGHT + fr.FONT_HEIGHT - 1, 0xFF444444);
} else if (new Rectangle(feature.x, feature.y + fr.FONT_HEIGHT + 6 - dy + i * fr.FONT_HEIGHT, feature.width, fr.FONT_HEIGHT).contains(mouseX, mouseY)) {
- RenderUtils.drawRectSafe(-1, i * fr.FONT_HEIGHT, feature.width - 3, i * fr.FONT_HEIGHT + fr.FONT_HEIGHT - 1, 0xFF555555);
+ Gui.drawRect(-1, i * fr.FONT_HEIGHT, feature.width - 3, i * fr.FONT_HEIGHT + fr.FONT_HEIGHT - 1, 0xFF555555);
}
if (obj instanceof DungeonMechanic) {
String name = sortedMechanicsName.get(i);
@@ -168,7 +158,7 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
} else if ("$SPECIAL-CANCEL".equals(obj)) {
fr.drawString("Cancel Current", 3, i * fr.FONT_HEIGHT, 0xFF00FFFF);
} else {
- RenderUtils.drawRectSafe(-1, i * fr.FONT_HEIGHT, feature.width - 3, i * fr.FONT_HEIGHT + fr.FONT_HEIGHT - 1, 0xFF444444);
+ Gui.drawRect(-1, i * fr.FONT_HEIGHT, feature.width - 3, i * fr.FONT_HEIGHT + fr.FONT_HEIGHT - 1, 0xFF444444);
fr.drawString((String)obj, 3, i * fr.FONT_HEIGHT, 0xFFEEEEEE);
}
}
@@ -177,14 +167,14 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
if (selected != -1) {
clip(new ScaledResolution(Minecraft.getMinecraft()), feature.x + feature.width, feature.y + fr.FONT_HEIGHT + 5, feature.width , feature.height - fr.FONT_HEIGHT - 6);
GlStateManager.translate(feature.width, selected * fr.FONT_HEIGHT, 0);
- RenderUtils.drawRectSafe(0, 0, feature.width, fr.FONT_HEIGHT * possibleStates.size() + 4, 0xFF444444);
- RenderUtils.drawRectSafe(-1, 1, feature.width - 1, fr.FONT_HEIGHT * possibleStates.size() + 3, 0xFF262626);
+ Gui.drawRect(0, 0, feature.width, fr.FONT_HEIGHT * possibleStates.size() + 4, 0xFF444444);
+ Gui.drawRect(-1, 1, feature.width - 1, fr.FONT_HEIGHT * possibleStates.size() + 3, 0xFF262626);
GlStateManager.translate(2,2, 0);
Point popupStart = new Point(feature.x + feature.width, (selected + 1) * fr.FONT_HEIGHT +6 + feature.y - dy + 2);
for (int i = 0; i < possibleStates.size(); i++) {
if (new Rectangle(feature.x + feature.width, popupStart.y + i * fr.FONT_HEIGHT, feature.width, fr.FONT_HEIGHT).contains(mouseX, mouseY)) {
- RenderUtils.drawRectSafe(-2, i * fr.FONT_HEIGHT, feature.width - 3, i * fr.FONT_HEIGHT + fr.FONT_HEIGHT - 1, 0xFF555555);
+ Gui.drawRect(-2, i * fr.FONT_HEIGHT, feature.width - 3, i * fr.FONT_HEIGHT + fr.FONT_HEIGHT - 1, 0xFF555555);
}
fr.drawString(possibleStates.get(i), 0, i * fr.FONT_HEIGHT, 0xFFFFFFFF);
}
@@ -313,14 +303,7 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
@Override
public void onMouseInput(GuiScreenEvent.MouseInputEvent.Pre mouseInputEvent) {
if (!isEnabled()) return;
- if (Minecraft.getMinecraft().currentScreen instanceof GuiGuiLocationConfig
- || Minecraft.getMinecraft().currentScreen instanceof GuiConfig
- || Minecraft.getMinecraft().currentScreen instanceof GuiDungeonRoomEdit
- || Minecraft.getMinecraft().currentScreen instanceof GuiDungeonAddSet
- || Minecraft.getMinecraft().currentScreen instanceof GuiDungeonParameterEdit
- || Minecraft.getMinecraft().currentScreen instanceof GuiDungeonValueEdit
- || Minecraft.getMinecraft().currentScreen instanceof GuiContainer
- || Minecraft.getMinecraft().currentScreen instanceof GuiIngameMenu) return;
+ if (!(Minecraft.getMinecraft().currentScreen instanceof GuiChat)) return;
if (!skyblockStatus.isOnDungeon()) return;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java b/src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java
index c1b182d7..a1f280a9 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/text/PanelTextParameterConfig.java
@@ -103,9 +103,9 @@ public class PanelTextParameterConfig extends MPanel {
GlStateManager.pushMatrix();
int width = 200, height = 100;
- RenderUtils.drawRectSafe(0,0,getBounds().width, getBounds().height, 0xFF444444);
- RenderUtils.drawRectSafe(4,4,width+6, height+6, 0xFF222222);
- RenderUtils.drawRectSafe(5,5,width+5, height+5, 0xFF555555);
+ Gui.drawRect(0,0,getBounds().width, getBounds().height, 0xFF444444);
+ Gui.drawRect(4,4,width+6, height+6, 0xFF222222);
+ Gui.drawRect(5,5,width+5, height+5, 0xFF555555);
Rectangle clip = new Rectangle(scissor.x + 5, scissor.y + 5, width, height);
clip(new ScaledResolution(Minecraft.getMinecraft()), clip.x, clip.y, clip.width, clip.height);
@@ -120,11 +120,11 @@ public class PanelTextParameterConfig extends MPanel {
boolean bool =clip.contains(absMousex, absMousey);
for (StyledTextRenderer.StyleTextAssociated calc3: calc) {
if (selected.contains(calc3.getStyledText().getGroup())) {
- RenderUtils.drawRectSafe(calc3.getRectangle().x, calc3.getRectangle().y, calc3.getRectangle().x + calc3.getRectangle().width, calc3.getRectangle().y + calc3.getRectangle().height, 0x4244A800);
+ Gui.drawRect(calc3.getRectangle().x, calc3.getRectangle().y, calc3.getRectangle().x + calc3.getRectangle().width, calc3.getRectangle().y + calc3.getRectangle().height, 0x4244A800);
} else if (bool && calc3.getRectangle().contains((relMousex0-5 -offsetX) * scale , (relMousey0 - 5 - offsetY) * scale)) {
for (StyledTextRenderer.StyleTextAssociated calc2 : calc) {
if (calc2.getStyledText().getGroup().equals(calc3.getStyledText().getGroup()))
- RenderUtils.drawRectSafe(calc2.getRectangle().x, calc2.getRectangle().y, calc2.getRectangle().x + calc2.getRectangle().width, calc2.getRectangle().y + calc2.getRectangle().height, 0x55777777);
+ Gui.drawRect(calc2.getRectangle().x, calc2.getRectangle().y, calc2.getRectangle().x + calc2.getRectangle().width, calc2.getRectangle().y + calc2.getRectangle().height, 0x55777777);
}
}
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/text/StyledTextRenderer.java b/src/main/java/kr/syeyoung/dungeonsguide/features/text/StyledTextRenderer.java
index d6fd8ab4..8eef0027 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/text/StyledTextRenderer.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/text/StyledTextRenderer.java
@@ -89,7 +89,7 @@ public class StyledTextRenderer {
if (stopDraw)
return new Dimension(fr.getStringWidth(content), fr.FONT_HEIGHT);
- RenderUtils.drawRectSafe(x,y, x+fr.getStringWidth(content), y + fr.FONT_HEIGHT, RenderUtils.getColorAt(x,y, style.getBackground()));
+ Gui.drawRect(x,y, x+fr.getStringWidth(content), y + fr.FONT_HEIGHT, RenderUtils.getColorAt(x,y, style.getBackground()));
GlStateManager.enableBlend();
if (!style.getColor().isChroma()) {
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());
}
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java
index 79c1faa9..8509e0b1 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java
@@ -182,8 +182,8 @@ public class PartyInviteViewer {
GlStateManager.pushMatrix();
GlStateManager.translate(x,y,0);
- RenderUtils.drawRectSafe(0, 0,width,height, 0xFF23272a);
- RenderUtils.drawRectSafe(2, 2, width-2, height-2, 0XFF2c2f33);
+ Gui.drawRect(0, 0,width,height, 0xFF23272a);
+ Gui.drawRect(2, 2, width-2, height-2, 0XFF2c2f33);
{
String avatar = "https://cdn.discordapp.com/avatars/"+partyJoinRequest.getDiscordUser().userId+"/"+partyJoinRequest.getDiscordUser().avatar+".png";
Future<LoadedImage> loadedImageFuture = loadImage(avatar);
@@ -214,7 +214,7 @@ public class PartyInviteViewer {
GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit);
GlStateManager.popAttrib();
} else {
- RenderUtils.drawRectSafe(7, 7, height - 7, height-7, 0xFF4E4E4E);
+ Gui.drawRect(7, 7, height - 7, height-7, 0xFF4E4E4E);
}
}
@@ -244,7 +244,7 @@ public class PartyInviteViewer {
GlStateManager.pushMatrix();
String text = "Accept";
partyJoinRequest.getAcceptRect().setBounds(x + height + 3, y + height - 25, widthForTheThing - 10, 25);
- RenderUtils.drawRectSafe(0, 0, widthForTheThing - 10, 25, hover && partyJoinRequest.getAcceptRect().contains(mouseX, mouseY) ? 0xFF859DF0 : 0xFF7289da);
+ Gui.drawRect(0, 0, widthForTheThing - 10, 25, hover && partyJoinRequest.getAcceptRect().contains(mouseX, mouseY) ? 0xFF859DF0 : 0xFF7289da);
GlStateManager.translate((widthForTheThing - 10 - fr.getStringWidth(text) * 2) / 2, 15 - fr.FONT_HEIGHT, 0);
GlStateManager.scale(2.0f, 2.0f, 1.0f);
@@ -252,7 +252,7 @@ public class PartyInviteViewer {
GlStateManager.popMatrix();
GlStateManager.translate(widthForTheThing, 0, 0);
partyJoinRequest.getDenyRect().setBounds(x + height + 3 + widthForTheThing, y + height - 25, widthForTheThing - 10, 25);
- RenderUtils.drawRectSafe(0, 0, widthForTheThing - 10, 25, hover && partyJoinRequest.getDenyRect().contains(mouseX, mouseY) ? 0xFFAEC0CB : 0xFF99aab5);
+ Gui.drawRect(0, 0, widthForTheThing - 10, 25, hover && partyJoinRequest.getDenyRect().contains(mouseX, mouseY) ? 0xFFAEC0CB : 0xFF99aab5);
GlStateManager.pushMatrix();
text = "Deny";
GlStateManager.translate((widthForTheThing - 10 - fr.getStringWidth(text) * 2) / 2, 15 - fr.FONT_HEIGHT, 0);
@@ -261,7 +261,7 @@ public class PartyInviteViewer {
GlStateManager.popMatrix();
GlStateManager.translate(widthForTheThing, 0, 0);
partyJoinRequest.getIgnoreRect().setBounds(x + height + 3 + widthForTheThing + widthForTheThing, y + height - 25, widthForTheThing - 10, 25);
- RenderUtils.drawRectSafe(0, 0, widthForTheThing - 10, 25, hover && partyJoinRequest.getIgnoreRect().contains(mouseX, mouseY) ? 0xFFAEC0CB : 0xFF99aab5); // AEC0CB
+ Gui.drawRect(0, 0, widthForTheThing - 10, 25, hover && partyJoinRequest.getIgnoreRect().contains(mouseX, mouseY) ? 0xFFAEC0CB : 0xFF99aab5); // AEC0CB
GlStateManager.pushMatrix();
text = "Ignore";
GlStateManager.translate((widthForTheThing - 10 - fr.getStringWidth(text) * 2) / 2, 15 - fr.FONT_HEIGHT, 0);
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionTreeDisplayPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionTreeDisplayPane.java
index a0c17ef8..a4f95e07 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionTreeDisplayPane.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/ActionTreeDisplayPane.java
@@ -156,8 +156,8 @@ public class ActionTreeDisplayPane extends MPanel {
int offset = 2;
int height = (fr.FONT_HEIGHT + offset) * lines.length;
- RenderUtils.drawRectSafe(x,y,x + maxWidth +10, y + height + 10, 0xff000000);
- RenderUtils.drawRectSafe(x+1,y+1,x + maxWidth +8, y + height + 8, 0xff4d4d4d);
+ Gui.drawRect(x,y,x + maxWidth +10, y + height + 10, 0xff000000);
+ Gui.drawRect(x+1,y+1,x + maxWidth +8, y + height + 8, 0xff4d4d4d);
for (int i = 0; i < lines.length; i++) {
fr.drawString(lines[i], x + 5, y + 5 + i*(fr.FONT_HEIGHT + offset), 0xffffffff);
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomDataDisplayPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomDataDisplayPane.java
index fcd8e69b..ac2c55b2 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomDataDisplayPane.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomDataDisplayPane.java
@@ -34,14 +34,14 @@ public class RoomDataDisplayPane extends MPanel {
int[][] blocks = dungeonRoom.getDungeonRoomInfo().getBlocks();
// draw Axis;
- RenderUtils.drawRectSafe(0,0,10,10,0x77777777);
+ Gui.drawRect(0,0,10,10,0x77777777);
clip(sr, clip.x + 10, clip.y, clip.width - 10, 10);
- RenderUtils.drawRectSafe(0,0,getBounds().width, getBounds().height, 0x77777777);
+ Gui.drawRect(0,0,getBounds().width, getBounds().height, 0x77777777);
for (int x = 0; x < blocks[0].length; x++) {
fr.drawString(x+"", x * 16 +10 + offsetX, 0, 0xFFFFFFFF);
}
clip(sr, clip.x, clip.y +10, 10, clip.height-10);
- RenderUtils.drawRectSafe(0,0,getBounds().width, getBounds().height, 0x77777777);
+ Gui.drawRect(0,0,getBounds().width, getBounds().height, 0x77777777);
for (int z = 0; z < blocks.length; z++) {
fr.drawString(z+"", 2, z * 16 + 10 + offsetY, 0xFFFFFFFF);
}
@@ -54,9 +54,9 @@ public class RoomDataDisplayPane extends MPanel {
for (int x = 0; x < blocks[z].length; x++) {
int data = blocks[z][x];
if (z == selectedY && x == selectedX){
- RenderUtils.drawRectSafe(x *16 +10+offsetX, z *16 +10 + offsetY, x *16 +26 +offsetX, z *16 +26 + offsetY, 0xAA707070);
+ Gui.drawRect(x *16 +10+offsetX, z *16 +10 + offsetY, x *16 +26 +offsetX, z *16 +26 + offsetY, 0xAA707070);
} else if (z == hoverY && x == hoverX) {
- RenderUtils.drawRectSafe(x *16 +10+offsetX, z *16 +10 + offsetY, x *16 +26 +offsetX, z *16 +26 + offsetY, 0xAA505050);
+ Gui.drawRect(x *16 +10+offsetX, z *16 +10 + offsetY, x *16 +26 +offsetX, z *16 +26 + offsetY, 0xAA505050);
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomMatchDisplayPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomMatchDisplayPane.java
index 6c6cc6a5..67d90b36 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomMatchDisplayPane.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/RoomMatchDisplayPane.java
@@ -45,14 +45,14 @@ public class RoomMatchDisplayPane extends MPanel {
int width = Math.max(currentBlocks[0].length, targetBlocks[0].length);
// draw Axis;
- RenderUtils.drawRectSafe(0,0,10,10,0x77777777);
+ Gui.drawRect(0,0,10,10,0x77777777);
clip(sr, clip.x + 10, clip.y, clip.width - 10, 10);
- RenderUtils.drawRectSafe(0,0,getBounds().width, getBounds().height, 0x77777777);
+ Gui.drawRect(0,0,getBounds().width, getBounds().height, 0x77777777);
for (int x = 0; x < width; x++) {
fr.drawString(x+"", x * 16 +10 + offsetX, 0, 0xFFFFFFFF);
}
clip(sr, clip.x, clip.y +10, 10, clip.height-10);
- RenderUtils.drawRectSafe(0,0,getBounds().width, getBounds().height, 0x77777777);
+ Gui.drawRect(0,0,getBounds().width, getBounds().height, 0x77777777);
for (int z = 0; z < height; z++) {
fr.drawString(z+"", 2, z * 16 + 10 + offsetY, 0xFFFFFFFF);
}
@@ -73,7 +73,7 @@ public class RoomMatchDisplayPane extends MPanel {
}
if (z == hoverY && x == hoverX) {
- RenderUtils.drawRectSafe(x *16 +10+offsetX, z *16 +10 + offsetY, x *16 +26 +offsetX, z *16 +26 + offsetY, 0xAA505050);
+ Gui.drawRect(x *16 +10+offsetX, z *16 +10 + offsetY, x *16 +26 +offsetX, z *16 +26 + offsetY, 0xAA505050);
}
if (data1 == data2) drawItemStack(new ItemStack(Item.getItemFromBlock(Block.getBlockById(data1)), 1), x * 16 +10 + offsetX, z *16 +10 + offsetY);
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorBlazeSolver.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorBlazeSolver.java
index 66f607b2..d8401756 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorBlazeSolver.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorBlazeSolver.java
@@ -137,7 +137,7 @@ public class RoomProcessorBlazeSolver extends GeneralRoomProcessor {
GL11.glStencilFunc(GL11.GL_EQUAL, 1, 0xFF);
GL11.glStencilOp(GL11.GL_KEEP, GL11.GL_KEEP, GL11.GL_KEEP);
-// RenderUtils.drawRectSafe(-9999,-9999, 9999, 9999, 0xFFFFFFFF);
+// Gui.drawRect(-9999,-9999, 9999, 9999, 0xFFFFFFFF);
boolean border = true;
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java b/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java
index 8ffcab39..35319e71 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/utils/RenderUtils.java
@@ -70,6 +70,7 @@ public class RenderUtils {
}
tessellator.draw();
GlStateManager.enableTexture2D();
+ GlStateManager.disableBlend();
}
@@ -117,42 +118,6 @@ public class RenderUtils {
}
tessellator.draw();
GlStateManager.enableTexture2D();
- GlStateManager.enableBlend();
- }
-
- public static void drawRectSafe(int left, int top, int right, int bottom, int color)
- {
- if (left < right)
- {
- int i = left;
- left = right;
- right = i;
- }
-
- if (top < bottom)
- {
- int j = top;
- top = bottom;
- bottom = j;
- }
-
- float f3 = (float)(color >> 24 & 255) / 255.0F;
- float f = (float)(color >> 16 & 255) / 255.0F;
- float f1 = (float)(color >> 8 & 255) / 255.0F;
- float f2 = (float)(color & 255) / 255.0F;
- Tessellator tessellator = Tessellator.getInstance();
- WorldRenderer worldrenderer = tessellator.getWorldRenderer();
- GlStateManager.enableBlend();
- GlStateManager.disableTexture2D();
- GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
- GlStateManager.color(f, f1, f2, f3);
- worldrenderer.begin(7, DefaultVertexFormats.POSITION);
- worldrenderer.pos((double)left, (double)bottom, 0.0D).endVertex();
- worldrenderer.pos((double)right, (double)bottom, 0.0D).endVertex();
- worldrenderer.pos((double)right, (double)top, 0.0D).endVertex();
- worldrenderer.pos((double)left, (double)top, 0.0D).endVertex();
- tessellator.draw();
- GlStateManager.enableTexture2D();
GlStateManager.disableBlend();
}