From 0f390b554531c5ca211160e3ff81a79bbda3ae57 Mon Sep 17 00:00:00 2001 From: syeyoung <42869671+cyoung06@users.noreply.github.com> Date: Mon, 14 Dec 2020 19:08:28 +0900 Subject: set targets --- .../syeyoung/dungeonsguide/roomedit/EditingContext.java | 1 - .../roomedit/mechanicedit/ValueEditLever.java | 15 +++++++++++++++ .../roomedit/mechanicedit/ValueEditOnewayLever.java | 16 ++++++++++++++++ .../roomedit/mechanicedit/ValueEditPressurePlate.java | 16 ++++++++++++++++ 4 files changed, 47 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/EditingContext.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/EditingContext.java index 4045503e..35f020a1 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/EditingContext.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/EditingContext.java @@ -63,7 +63,6 @@ public class EditingContext { } public void reopen() { - guiDungeonRoomEdit.endEditing(); Minecraft.getMinecraft().displayGuiScreen(current); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditLever.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditLever.java index 27e26eb3..7bc41e1f 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditLever.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditLever.java @@ -27,6 +27,8 @@ public class ValueEditLever extends MPanel implements ValueEdit { private MValue value; private MTextField preRequisite; private MLabelAndElement preRequisite2; + private MTextField target; + private MLabelAndElement target2; public ValueEditLever(final Parameter parameter2) { this.parameter = parameter2; @@ -51,6 +53,18 @@ public class ValueEditLever extends MPanel implements ValueEdit { preRequisite2 = new MLabelAndElement("Req.",preRequisite); preRequisite2.setBounds(new Rectangle(0,40,bounds.width,20)); add(preRequisite2); + + + target = new MTextField() { + @Override + public void edit(String str) { + dungeonLever.setTriggering(str); + } + }; + target.setText(dungeonLever.getTriggering()); + target2 = new MLabelAndElement("Req.",target); + target2.setBounds(new Rectangle(0,60,bounds.width,20)); + add(target2); } @Override @@ -58,6 +72,7 @@ public class ValueEditLever extends MPanel implements ValueEdit { label.setBounds(new Rectangle(0,0,bounds.width, 20)); value.setBounds(new Rectangle(0,20,bounds.width, 20)); preRequisite2.setBounds(new Rectangle(0,40,bounds.width,20)); + target2.setBounds(new Rectangle(0,60,bounds.width,20)); } @Override diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditOnewayLever.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditOnewayLever.java index 9a510867..90edcb63 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditOnewayLever.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/mechanicedit/ValueEditOnewayLever.java @@ -29,6 +29,9 @@ public class ValueEditOnewayLever extends MPanel implements ValueEdit value; private MTextField preRequisite; private MLabelAndElement preRequisite2; + private MTextField target; + private MLabelAndElement target2; + public ValueEditOnewayLever(final Parameter parameter2) { this.parameter = parameter2; @@ -53,6 +56,18 @@ public class ValueEditOnewayLever extends MPanel implements ValueEdit value; private MTextField preRequisite; private MLabelAndElement preRequisite2; + private MTextField target; + private MLabelAndElement target2; + public ValueEditPressurePlate(final Parameter parameter2) { this.parameter = parameter2; @@ -53,6 +56,18 @@ public class ValueEditPressurePlate extends MPanel implements ValueEdit