actions can you please work
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user