Skip to content

Commit 39f7dca

Browse files
committed
EditableTextField: allow cycling through Bool values
see #1924 Also fixed an issue with setting Bool values on Flash.
1 parent 52d2ce2 commit 39f7dca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

flixel/system/debug/watch/EditableTextField.hx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ class EditableTextField extends TextField implements IFlxDestroyable
8888
switch (expectedType)
8989
{
9090
case TInt | TFloat: cycleNumericValue(modifier);
91+
case TBool if (text == "true"): text = "false";
92+
case TBool: text = "true";
9193
case _: setSelection(selection, selection);
9294
}
9395
}
@@ -115,9 +117,9 @@ class EditableTextField extends TextField implements IFlxDestroyable
115117
#if neko
116118
case TInt: Std.parseInt(text);
117119
case TFloat: Std.parseFloat(text);
120+
#end
118121
case TBool if (text == "true"): true;
119122
case TBool if (text == "false"): false;
120-
#end
121123
case _: text;
122124
}
123125

0 commit comments

Comments
 (0)