Open utterances-bot opened 4 years ago
As the option to get Rgb arguments: trace(Type.enumParameters(color))
It would be cool if there was a way to extract values using if statements, similar to Rust
if (valueThing == MyEnum.Percentage(percent) && percent != 0) { .. }
@FlooferLand See this macro: https://code.haxe.org/category/macros/extract-enum-value.html
Using enums - Haxe - The Cross-platform Toolkit
Haxe is an open source toolkit based on a modern, high level, strictly typed programming language.
https://haxe.org/manual/types-enum-using.html