actions can you please work

This commit is contained in:
Ralty
2025-07-26 19:03:18 +07:00
parent 83460a86cb
commit 45721b8cf3
3 changed files with 3 additions and 4 deletions
+1 -2
View File
@@ -52,8 +52,7 @@ class ArrayOption extends TextOption {
}
override function changeSelection(change:Int) {
if (locked) return;
currentSelection = FlxMath.wrap(currentSelection + change, 0, options.length - 1);
if (locked || currentSelection == (currentSelection = CoolUtil.boundInt(currentSelection + change, 0, options.length - 1))) return;
__selectionText.text = formatTextOption();
CoolUtil.playMenuSFX(SCROLL);
+1 -1
View File
@@ -37,7 +37,7 @@ class Checkbox extends TextOption {
__text.x = 100;
var fieldValue = Reflect.field(parent, optionName);
checked = fieldValue != null && fieldValue;
checked = fieldValue != null ? fieldValue : false;
}
public var firstFrame:Bool = true;
+1 -1
View File
@@ -32,7 +32,7 @@ class NumOption extends TextOption {
this.parent = parent = parent != null ? parent : Options;
var fieldValue = Reflect.field(parent, optionName);
if (fieldValue != null) currentSelection = fieldValue;
currentSelection = fieldValue != null ? fieldValue : 0;
__number = new Alphabet(0, 20, ': $currentSelection', 'bold');
super(text, desc);