diff options
author | syeyoung <cyong06@naver.com> | 2021-02-12 00:03:42 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-02-12 00:03:42 +0900 |
commit | 89c82ad1fea9fd0a8e32a5e818c6c01856cdd660 (patch) | |
tree | eb989b2e58b2b18480d41a262b9cabf1a0ba387d /src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes | |
parent | 505cb6fc92e7d2c7412b43f459796791ca36e5a3 (diff) | |
download | Skyblock-Dungeons-Guide-89c82ad1fea9fd0a8e32a5e818c6c01856cdd660.tar.gz Skyblock-Dungeons-Guide-89c82ad1fea9fd0a8e32a5e818c6c01856cdd660.tar.bz2 Skyblock-Dungeons-Guide-89c82ad1fea9fd0a8e32a5e818c6c01856cdd660.zip |
YES
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes')
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/GeneralEditPane.java | 27 | ||||
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/SecretEditPane.java | 10 |
2 files changed, 27 insertions, 10 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/GeneralEditPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/GeneralEditPane.java index 11e1982c..fc2584d6 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/GeneralEditPane.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/GeneralEditPane.java @@ -27,6 +27,7 @@ public class GeneralEditPane extends MPanel { private MLabelAndElement uuid; private MLabelAndElement name; + private MLabelAndElement secrets; private MLabelAndElement shape; private MLabelAndElement rotation; @@ -59,12 +60,24 @@ public class GeneralEditPane extends MPanel { name.setBounds(new Rectangle(0,20,getBounds().width, 20)); add(name); } + { + final MIntegerSelectionButton la = new MIntegerSelectionButton(dungeonRoom.getDungeonRoomInfo().getTotalSecrets()); + la.setOnUpdate(new Runnable() { + @Override + public void run() { + dungeonRoom.getDungeonRoomInfo().setTotalSecrets(la.getData()); + } + }); + secrets = new MLabelAndElement("Room Secrets: ", la); + secrets.setBounds(new Rectangle(0,40,getBounds().width, 20)); + add(secrets); + } { MLabel la; shape = new MLabelAndElement("Room Shape: ", la = new MLabel()); la.setText(dungeonRoom.getDungeonRoomInfo().getShape()+""); - shape.setBounds(new Rectangle(0,40,getBounds().width, 20)); + shape.setBounds(new Rectangle(0,60,getBounds().width, 20)); add(shape); } @@ -72,20 +85,20 @@ public class GeneralEditPane extends MPanel { MLabel la; rotation = new MLabelAndElement("Found Room Rotation: ", la = new MLabel()); la.setText(dungeonRoom.getRoomMatcher().getRotation()+""); - rotation.setBounds(new Rectangle(0,60,getBounds().width, 20)); + rotation.setBounds(new Rectangle(0,80,getBounds().width, 20)); add(rotation); } { MLabel la; shape2 = new MLabelAndElement("Found Room Shape: ", la = new MLabel()); la.setText(dungeonRoom.getShape()+""); - shape2.setBounds(new Rectangle(0,80,getBounds().width, 20)); + shape2.setBounds(new Rectangle(0,100,getBounds().width, 20)); add(shape2); } { final MStringSelectionButton mStringSelectionButton = new MStringSelectionButton(new ArrayList<String>(ProcessorFactory.getProcessors()), dungeonRoom.getDungeonRoomInfo().getProcessorId()); roomProcessor = new MLabelAndElement("Room Processor: ", mStringSelectionButton); - roomProcessor.setBounds(new Rectangle(0,100,getBounds().width, 20)); + roomProcessor.setBounds(new Rectangle(0,120,getBounds().width, 20)); add(roomProcessor); mStringSelectionButton.setOnUpdate(new Runnable() { @@ -106,7 +119,7 @@ public class GeneralEditPane extends MPanel { } }); end.setBackgroundColor(Color.green); - end.setBounds(new Rectangle(0,120,getBounds().width, 20)); + end.setBounds(new Rectangle(0,140,getBounds().width, 20)); add(end); } { @@ -132,7 +145,7 @@ public class GeneralEditPane extends MPanel { } }); schematic.setBackgroundColor(Color.orange); - schematic.setBounds(new Rectangle(0,160,getBounds().width, 20)); + schematic.setBounds(new Rectangle(0,180,getBounds().width, 20)); add(schematic); } { @@ -147,7 +160,7 @@ public class GeneralEditPane extends MPanel { } }); save.setBackgroundColor(Color.green); - save.setBounds(new Rectangle(0,140,getBounds().width, 20)); + save.setBounds(new Rectangle(0,10,getBounds().width, 20)); add(save); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/SecretEditPane.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/SecretEditPane.java index 10a40013..6225f133 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/SecretEditPane.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/SecretEditPane.java @@ -36,6 +36,12 @@ public class SecretEditPane extends MPanel implements DynamicEditor { } } + public void createNewMechanic(String uid, DungeonMechanic data) { + MParameter parameter; + parameters.add(parameter = new MParameter(new Parameter(uid, data, data), SecretEditPane.this)); + parameter.setBounds(new Rectangle(0,0,getBounds().width, 20)); + } + public void buildElements() { { create = new MButton(); @@ -45,9 +51,7 @@ public class SecretEditPane extends MPanel implements DynamicEditor { create.setOnActionPerformed(new Runnable() { @Override public void run() { - MParameter parameter; - parameters.add(parameter = new MParameter(new Parameter(UUID.randomUUID().toString(), null, null), SecretEditPane.this)); - parameter.setBounds(new Rectangle(0,0,getBounds().width, 20)); + createNewMechanic(UUID.randomUUID().toString(), null); } }); |