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/IntegerPropertyEditor.java | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 NET/worlds/scape/IntegerPropertyEditor.java (limited to 'NET/worlds/scape/IntegerPropertyEditor.java') diff --git a/NET/worlds/scape/IntegerPropertyEditor.java b/NET/worlds/scape/IntegerPropertyEditor.java new file mode 100644 index 0000000..dc210ac --- /dev/null +++ b/NET/worlds/scape/IntegerPropertyEditor.java @@ -0,0 +1,35 @@ +package NET.worlds.scape; + +import NET.worlds.console.PolledDialog; + +public class IntegerPropertyEditor extends PropEditor { + boolean rangeLimits = false; + int minVal; + int maxVal; + + private IntegerPropertyEditor(Property property) { + super(property); + } + + private IntegerPropertyEditor(Property property, int minVal, int maxVal) { + super(property); + this.rangeLimits = true; + this.minVal = minVal; + this.maxVal = maxVal; + } + + @Override + public PolledDialog edit(EditTile parent, String title) { + return new IntegerFieldEditorDialog(parent, title, this.property, this); + } + + public static Property make(Property property) { + property.setPropertyType(1); + return property.setEditor(new IntegerPropertyEditor(property)); + } + + public static Property make(Property property, int minVal, int maxVal) { + property.setPropertyType(1); + return property.setEditor(new IntegerPropertyEditor(property, minVal, maxVal)); + } +} -- cgit v1.2.3