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/EnumFieldEditorDialog.java | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 NET/worlds/scape/EnumFieldEditorDialog.java (limited to 'NET/worlds/scape/EnumFieldEditorDialog.java') diff --git a/NET/worlds/scape/EnumFieldEditorDialog.java b/NET/worlds/scape/EnumFieldEditorDialog.java new file mode 100644 index 0000000..0fccdc7 --- /dev/null +++ b/NET/worlds/scape/EnumFieldEditorDialog.java @@ -0,0 +1,23 @@ +package NET.worlds.scape; + +class EnumFieldEditorDialog extends CheckboxEditorDialog { + private Property property; + private int[] numbers; + + EnumFieldEditorDialog(EditTile parent, String title, Property property, String[] choices, int[] values) { + super(parent, title, choices); + this.property = property; + this.numbers = values; + this.ready(); + } + + @Override + protected int getValue() { + return (Integer)this.property.get(); + } + + @Override + protected void setValue(int choice) { + this.parent.addUndoableSet(this.property, new Integer(this.numbers[choice])); + } +} -- cgit v1.2.3