diff options
author | syeyoung <cyong06@naver.com> | 2021-08-11 15:43:43 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-08-11 15:43:43 +0900 |
commit | 21ec99c3e45e4557e228d026c148207b1227c14b (patch) | |
tree | 6b9972492da511c351cc07a9d215dd3b0ab77def /src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MModal.java | |
parent | a48cb5c96e16fae589cb7d4f09146a17b3787924 (diff) | |
download | Skyblock-Dungeons-Guide-21ec99c3e45e4557e228d026c148207b1227c14b.tar.gz Skyblock-Dungeons-Guide-21ec99c3e45e4557e228d026c148207b1227c14b.tar.bz2 Skyblock-Dungeons-Guide-21ec99c3e45e4557e228d026c148207b1227c14b.zip |
- X Started playing skyblock alarm
- Better Scrollbar
- Modal Message
- Inviting Friends in discord
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MModal.java')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MModal.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MModal.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MModal.java index 71a13c93..be2c64d6 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MModal.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MModal.java @@ -30,6 +30,7 @@ import net.minecraft.client.renderer.GlStateManager; import java.awt.*; public class MModal extends MTooltip { + @Getter private MPanel modalContent = new MPanel(); @Getter @Setter @@ -50,8 +51,8 @@ public class MModal extends MTooltip { @Override - public void setBounds(Rectangle bounds) { - super.setBounds(bounds); + public void onBoundsUpdate() { + super.onBoundsUpdate(); Dimension effDim = getEffectiveDimension(); modalContent.setBounds(new Rectangle((effDim.width - modalSize.width)/2, (effDim.height - modalSize.height)/2 + 16, modalSize.width, modalSize.height-16)); @@ -64,15 +65,15 @@ public class MModal extends MTooltip { int x = (effDim.width-modalSize.width)/2; int y = (effDim.height - modalSize.height)/2; GlStateManager.translate(x,y, 0); - RenderUtils.drawRoundedRectangle(0,0,modalSize.width, modalSize.height, 10, Math.PI/8, RenderUtils.blendAlpha(0x141414, 0.20f)); + RenderUtils.drawRoundedRectangle(0,0,modalSize.width, modalSize.height, 3, Math.PI/8, RenderUtils.blendAlpha(0x141414, 0.20f)); Gui.drawRect(0,15, modalSize.width, 16, 0xFF02EE67); Gui.drawRect(0,16,modalSize.width, 26, RenderUtils.blendAlpha(0x141414, 0.1f)); - RenderUtils.drawRoundedRectangle(0,16,modalSize.width, modalSize.height-16, 10, Math.PI/8, RenderUtils.blendAlpha(0x141414, 0.1f)); + RenderUtils.drawRoundedRectangle(0,16,modalSize.width, modalSize.height-16, 3, Math.PI/8, RenderUtils.blendAlpha(0x141414, 0.1f)); GlStateManager.enableTexture2D(); FontRenderer fr = Minecraft.getMinecraft().fontRendererObj; - fr.drawString(title, 10,(16-fr.FONT_HEIGHT)/2, -1); + fr.drawString(title, 5,(16-fr.FONT_HEIGHT)/2, -1); } @Override @@ -80,6 +81,10 @@ public class MModal extends MTooltip { modalContent.add(child); } + protected void addSuper(MPanel child) { + super.add(child); + } + @Override public void remove(MPanel panel) { modalContent.remove(panel); |