Skip to content

Commit 146e9d6

Browse files
committed
allow for null<> versions
1 parent a2c6b6f commit 146e9d6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

haxe/ui/util/TypeConverter.hx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ class TypeConverter {
2727
return input;
2828
}
2929
switch (type.toLowerCase()) {
30-
case "string":
30+
case "string" | "null<string>":
3131
return Std.string(input);
32-
case "bool":
32+
case "bool" | "null<bool>":
3333
return Std.string(input) == "true";
34-
case "int":
34+
case "int" | "null<int>":
3535
if (input == null) {
3636
return 0;
3737
}
@@ -40,7 +40,7 @@ class TypeConverter {
4040
return 0;
4141
}
4242
return r;
43-
case "float":
43+
case "float" | "null<float>":
4444
if (input == null) {
4545
return 0;
4646
}
@@ -49,7 +49,7 @@ class TypeConverter {
4949
return 0;
5050
}
5151
return r;
52-
case "color":
52+
case "color" | "null<color>":
5353
return Color.fromString(Std.string(input));
5454
case "variant" | "dynamic" | "scalemode" | "selectionmode" | "scrollpolicy" | "scrollmode":
5555
return input;

0 commit comments

Comments
 (0)