summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/BooleanPropertyEditor.java
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-12 22:33:32 -0800
committerFuwn <[email protected]>2026-02-12 22:33:32 -0800
commitc7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9 (patch)
treedf9f48bf128a6c0186a8e91857d6ff30fe0e9f18 /NET/worlds/scape/BooleanPropertyEditor.java
downloadworldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.tar.xz
worldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.zip
Initial commit
Diffstat (limited to 'NET/worlds/scape/BooleanPropertyEditor.java')
-rw-r--r--NET/worlds/scape/BooleanPropertyEditor.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/NET/worlds/scape/BooleanPropertyEditor.java b/NET/worlds/scape/BooleanPropertyEditor.java
new file mode 100644
index 0000000..83db263
--- /dev/null
+++ b/NET/worlds/scape/BooleanPropertyEditor.java
@@ -0,0 +1,26 @@
+package NET.worlds.scape;
+
+import NET.worlds.console.PolledDialog;
+
+public class BooleanPropertyEditor extends PropEditor {
+ private String[] choices;
+ private String falseName;
+ private String trueName;
+
+ private BooleanPropertyEditor(Property property, String falseName, String trueName) {
+ super(property);
+ this.falseName = falseName;
+ this.trueName = trueName;
+ }
+
+ @Override
+ public PolledDialog edit(EditTile parent, String title) {
+ String[] choices = new String[]{this.falseName, this.trueName};
+ return new BooleanFieldEditorDialog(parent, title, this.property, choices);
+ }
+
+ public static Property make(Property property, String falseName, String trueName) {
+ property.setPropertyType(0);
+ return property.setEditor(new BooleanPropertyEditor(property, falseName, trueName));
+ }
+}