diff options
author | syeyoung <42869671+cyoung06@users.noreply.github.com> | 2020-12-10 22:46:37 +0900 |
---|---|---|
committer | syeyoung <42869671+cyoung06@users.noreply.github.com> | 2020-12-10 22:46:37 +0900 |
commit | 75aa91678c2dfdf844ecfcbb68bcf9389028ca4e (patch) | |
tree | 45757cabbc6e4c9b050f23102114ce89b10ea78d /src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MOffsetPoint.java | |
parent | cbd22473c62d076b25543611894da001685f5e21 (diff) | |
download | Skyblock-Dungeons-Guide-75aa91678c2dfdf844ecfcbb68bcf9389028ca4e.tar.gz Skyblock-Dungeons-Guide-75aa91678c2dfdf844ecfcbb68bcf9389028ca4e.tar.bz2 Skyblock-Dungeons-Guide-75aa91678c2dfdf844ecfcbb68bcf9389028ca4e.zip |
secretz
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MOffsetPoint.java')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MOffsetPoint.java | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MOffsetPoint.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MOffsetPoint.java deleted file mode 100644 index 3143f42a..00000000 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/elements/MOffsetPoint.java +++ /dev/null @@ -1,64 +0,0 @@ -package kr.syeyoung.dungeonsguide.roomedit.elements; - -import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint; -import kr.syeyoung.dungeonsguide.roomedit.EditingContext; -import kr.syeyoung.dungeonsguide.roomedit.MPanel; -import kr.syeyoung.dungeonsguide.roomedit.Parameter; -import kr.syeyoung.dungeonsguide.roomedit.gui.GuiDungeonOffsetPointEdit; -import kr.syeyoung.dungeonsguide.roomedit.gui.GuiDungeonParameterEdit; -import kr.syeyoung.dungeonsguide.roomedit.panes.ProcessorParameterEditPane; -import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEditOffsetPointSet; -import lombok.Getter; -import lombok.Setter; -import net.minecraft.client.gui.Gui; - -import java.awt.*; - -public class MOffsetPoint extends MPanel { - @Getter - private OffsetPoint data; - private ValueEditOffsetPointSet valueEditOffsetPointSet; - private MLabel dataLab; - - @Getter @Setter - private Color hover = Color.gray; - - - public MOffsetPoint(ValueEditOffsetPointSet valueEditOffsetPointSet, final OffsetPoint parameter) { - this.valueEditOffsetPointSet = valueEditOffsetPointSet; - this.add(this.dataLab = new MLabel() { - @Override - public String getText() { - return data != null ?data.toString() :"-empty-"; - } - }); - this.dataLab.setAlignment(MLabel.Alignment.RIGHT); - - this.data = parameter; - } - - @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),bounds.getSize()).contains(relMousex0, relMousey0)) { - Gui.drawRect(0,0,bounds.width, bounds.height, hover.getRGB()); - } - } - - @Override - public void mouseClicked(int absMouseX, int absMouseY, int relMouseX, int relMouseY, int mouseButton) { - if (this.bounds.x > -20 && new Rectangle(new Point(0,0),bounds.getSize()).contains(relMouseX, relMouseY)) { - EditingContext.getEditingContext().openGui(new GuiDungeonOffsetPointEdit(valueEditOffsetPointSet, data)); - } - } - - @Override - public void resize(int parentWidth, int parentHeight) { - this.setSize(new Dimension(parentWidth, bounds.height)); - dataLab.setBounds(new Rectangle(0,0,parentWidth, bounds.height)); - } - - @Override - public void onBoundsUpdate() { - dataLab.setBounds(new Rectangle(0,0,bounds.width, bounds.height)); - } -} |