diff options
author | syeyoung <42869671+cyoung06@users.noreply.github.com> | 2020-11-25 15:37:57 +0900 |
---|---|---|
committer | syeyoung <42869671+cyoung06@users.noreply.github.com> | 2020-11-25 15:37:57 +0900 |
commit | 81a315f025f361d1155305e55dfee29308a74ed3 (patch) | |
tree | 9be59a599ef9821ca9e66005207cee32022e5a4f /src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes | |
parent | a49e2c1970f6f77079a860dd5e92741251f41c9c (diff) | |
download | Skyblock-Dungeons-Guide-81a315f025f361d1155305e55dfee29308a74ed3.tar.gz Skyblock-Dungeons-Guide-81a315f025f361d1155305e55dfee29308a74ed3.tar.bz2 Skyblock-Dungeons-Guide-81a315f025f361d1155305e55dfee29308a74ed3.zip |
room processor stuff
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/GeneralEditPane.java | 25 |
1 files changed, 20 insertions, 5 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 59620ff0..eec9a63b 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/GeneralEditPane.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/panes/GeneralEditPane.java @@ -4,8 +4,10 @@ import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom; import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoomInfoRegistry; import kr.syeyoung.dungeonsguide.roomedit.MPanel; import kr.syeyoung.dungeonsguide.roomedit.elements.*; +import kr.syeyoung.dungeonsguide.roomprocessor.ProcessorFactory; import java.awt.*; +import java.util.ArrayList; public class GeneralEditPane extends MPanel { private DungeonRoom dungeonRoom; @@ -19,6 +21,8 @@ public class GeneralEditPane extends MPanel { private MButton save; + private MLabelAndElement roomProcessor; + public GeneralEditPane(final DungeonRoom dungeonRoom) { this.dungeonRoom = dungeonRoom; System.out.println("building"); @@ -66,9 +70,21 @@ System.out.println("building"); add(shape2); } { - System.out.println("roomdata"); + final MStringSelectionButton mStringSelectionButton = new MStringSelectionButton(new ArrayList<String>(ProcessorFactory.getProcessors())); + roomProcessor = new MLabelAndElement("Room Processor: ", mStringSelectionButton); + roomProcessor.setBounds(new Rectangle(0,100,bounds.width, 20)); + add(roomProcessor); + + mStringSelectionButton.setOnUpdate(new Runnable() { + @Override + public void run() { + dungeonRoom.getDungeonRoomInfo().setProcessorId(mStringSelectionButton.getSelected()); + dungeonRoom.updateRoomProcessor(); + } + }); + } + { if (dungeonRoom.getDungeonRoomInfo().isRegistered()) return; - System.out.println("roomdata"); save = new MButton(); save.setText("Save RoomData"); save.setOnActionPerformed(new Runnable() { @@ -79,8 +95,7 @@ System.out.println("building"); } }); save.setBackgroundColor(Color.green); - save.setBounds(new Rectangle(1,100,bounds.width-2, 20)); - System.out.println("roomdata"); + save.setBounds(new Rectangle(1,120,bounds.width-2, 20)); add(save); System.out.println(save.getBounds()); } @@ -94,6 +109,6 @@ System.out.println("building"); @Override public void onBoundsUpdate() { if (save != null) - save.setBounds(new Rectangle(0,100,bounds.width, 20)); + save.setBounds(new Rectangle(0,120,bounds.width, 20)); } } |