diff options
author | syeyoung <42869671+cyoung06@users.noreply.github.com> | 2020-12-12 18:33:55 +0900 |
---|---|---|
committer | syeyoung <42869671+cyoung06@users.noreply.github.com> | 2020-12-12 18:33:55 +0900 |
commit | bbbf49cef6d8ed46b3fc5d69ff880137e62084de (patch) | |
tree | e141602a5cee61ace54dda0f68288dc531cb9ef8 /src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditSecret.java | |
parent | 75aa91678c2dfdf844ecfcbb68bcf9389028ca4e (diff) | |
download | Skyblock-Dungeons-Guide-bbbf49cef6d8ed46b3fc5d69ff880137e62084de.tar.gz Skyblock-Dungeons-Guide-bbbf49cef6d8ed46b3fc5d69ff880137e62084de.tar.bz2 Skyblock-Dungeons-Guide-bbbf49cef6d8ed46b3fc5d69ff880137e62084de.zip |
secrets!
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditSecret.java')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditSecret.java | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditSecret.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditSecret.java index 368bf376..044a4b5c 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditSecret.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditSecret.java @@ -5,12 +5,11 @@ import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonSecret; import kr.syeyoung.dungeonsguide.roomedit.EditingContext; import kr.syeyoung.dungeonsguide.roomedit.MPanel; import kr.syeyoung.dungeonsguide.roomedit.Parameter; -import kr.syeyoung.dungeonsguide.roomedit.elements.MLabel; -import kr.syeyoung.dungeonsguide.roomedit.elements.MStringSelectionButton; -import kr.syeyoung.dungeonsguide.roomedit.elements.MValue; +import kr.syeyoung.dungeonsguide.roomedit.elements.*; import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEdit; import kr.syeyoung.dungeonsguide.roomedit.valueedit.ValueEditCreator; import kr.syeyoung.dungeonsguide.utils.RenderUtils; +import kr.syeyoung.dungeonsguide.utils.TextUtils; import net.minecraft.util.BlockPos; import scala.actors.threadpool.Arrays; @@ -28,6 +27,8 @@ public class ValueEditSecret extends MPanel implements ValueEdit<DungeonSecret> private MLabel label; private MValue<OffsetPoint> value; private MStringSelectionButton selectionButton; + private MTextField preRequisite; + private MLabelAndElement preRequisite2; public ValueEditSecret(final Parameter parameter2) { this.parameter = parameter2; @@ -50,6 +51,17 @@ public class ValueEditSecret extends MPanel implements ValueEdit<DungeonSecret> } }); add(selectionButton); + + preRequisite = new MTextField() { + @Override + public void edit(String str) { + dungeonSecret.setPreRequisite(Arrays.asList(str.split(","))); + } + }; + preRequisite.setText(TextUtils.join(dungeonSecret.getPreRequisite(), ",")); + preRequisite2 = new MLabelAndElement("Req.",preRequisite); + preRequisite2.setBounds(new Rectangle(0,60,bounds.width,20)); + add(preRequisite2); } @Override @@ -57,6 +69,7 @@ public class ValueEditSecret extends MPanel implements ValueEdit<DungeonSecret> label.setBounds(new Rectangle(0,0,bounds.width, 20)); value.setBounds(new Rectangle(0,20,bounds.width, 20)); selectionButton.setBounds(new Rectangle(0,40,bounds.width, 20)); + preRequisite2.setBounds(new Rectangle(0,60,bounds.width,20)); } @Override @@ -66,9 +79,7 @@ public class ValueEditSecret extends MPanel implements ValueEdit<DungeonSecret> @Override public void renderWorld(float partialTicks) { - BlockPos pos = dungeonSecret.getSecretPoint().getBlockPos(EditingContext.getEditingContext().getRoom()); - RenderUtils.highlightBlock(pos, new Color(0,255,0,50),partialTicks); - RenderUtils.drawTextAtWorld(dungeonSecret.getSecretType().name(), pos.getX() +0.5f, pos.getY()+0.5f, pos.getZ()+0.5f, 0xFF000000, 0.5f, false, false, partialTicks); + dungeonSecret.highlight(new Color(0,255,0,50), parameter.getName(), EditingContext.getEditingContext().getRoom(), partialTicks); } @Override |