diff options
author | syeyoung <cyong06@naver.com> | 2021-01-02 00:00:51 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-01-02 00:00:51 +0900 |
commit | 43ca7d03db3f75e1820138fb269a7b6ee5b95f08 (patch) | |
tree | c9b160e22febf3959338d205eb45e67009cb1d72 /src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiParameterConfig.java | |
parent | 5503237b9b2a2b75188188341f2dd8abe477c9f5 (diff) | |
download | Skyblock-Dungeons-Guide-43ca7d03db3f75e1820138fb269a7b6ee5b95f08.tar.gz Skyblock-Dungeons-Guide-43ca7d03db3f75e1820138fb269a7b6ee5b95f08.tar.bz2 Skyblock-Dungeons-Guide-43ca7d03db3f75e1820138fb269a7b6ee5b95f08.zip |
color edit done
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiParameterConfig.java')
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiParameterConfig.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiParameterConfig.java b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiParameterConfig.java index a234249b..bf2f811a 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiParameterConfig.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiParameterConfig.java @@ -18,7 +18,14 @@ import java.util.Arrays; public class GuiParameterConfig extends GuiScreen { - private MPanel mainPanel = new MPanel(); + private MPanel mainPanel = new MPanel() { + @Override + public void onBoundsUpdate() { + for (MPanel childComponent : getChildComponents()) { + childComponent.setSize(new Dimension(getBounds().width - 10, childComponent.getSize().height)); + } + } + }; private GuiScreen before; private AbstractFeature feature; @@ -38,6 +45,7 @@ public class GuiParameterConfig extends GuiScreen { } }); mainPanel.add(save); + mainPanel.setBackgroundColor(new Color(17, 17, 17, 179)); } @@ -58,12 +66,15 @@ public class GuiParameterConfig extends GuiScreen { int heights = 0; within = null; for (MPanel panel:mainPanel.getChildComponents()) { - panel.setPosition(new Point(0, -offsetY + heights)); + panel.setPosition(new Point(5, -offsetY + heights + 5)); heights += panel.getBounds().height; if (panel.getBounds().contains(mouseX - mainPanel.getBounds().x, mouseY - mainPanel.getBounds().y)) within = panel; } mainPanel.render0(scaledResolution, new Point(0,0), new Rectangle(0,0,scaledResolution.getScaledWidth(),scaledResolution.getScaledHeight()), mouseX, mouseY, mouseX, mouseY, partialTicks); + GL11.glPopMatrix(); + GL11.glPushMatrix(); + GlStateManager.color(1,1,1,1); if (within instanceof MParameter) { FeatureParameter feature = ((MParameter) within).getParameter(); GlStateManager.pushAttrib(); |