From c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 12 Feb 2026 22:33:32 -0800 Subject: Initial commit --- NET/worlds/scape/BooleanFieldEditorDialog.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 NET/worlds/scape/BooleanFieldEditorDialog.java (limited to 'NET/worlds/scape/BooleanFieldEditorDialog.java') diff --git a/NET/worlds/scape/BooleanFieldEditorDialog.java b/NET/worlds/scape/BooleanFieldEditorDialog.java new file mode 100644 index 0000000..ea661ca --- /dev/null +++ b/NET/worlds/scape/BooleanFieldEditorDialog.java @@ -0,0 +1,21 @@ +package NET.worlds.scape; + +class BooleanFieldEditorDialog extends CheckboxEditorDialog { + private Property property; + + BooleanFieldEditorDialog(EditTile parent, String title, Property property, String[] choices) { + super(parent, title, choices); + this.property = property; + this.ready(); + } + + @Override + protected int getValue() { + return this.property.get() ? 1 : 0; + } + + @Override + protected void setValue(int choice) { + this.parent.addUndoableSet(this.property, new Boolean(choice == 1)); + } +} -- cgit v1.2.3