bright-gpu-74537
12/23/2020, 9:04 AM@:behaviour - these are pretty complex, but basically haxeui is behavior driven, this means that when you call "myButton.text" rather than that lead directly to some code that does stuff it leads to a behviour that does stuff - the reason is because haxeui is cross framework and supports native backends... Backends are split into two broad categories: Composite (where haxeui handles all the internals) and Native (where haxeui delegates component creation and behaviours to a backed).
So take openfl and hxwidgets: .text leads to a default behaviour (which is a composite based beahviour) which will create a haxeui Label component, add it to the button, tell haxeui the composite layout is invalid and get it recalc all that - that'll kick in for composite backends (openfl, nme, kha, heaps, etc, etc)... however, for native backends that aint gonna work, the component is a native button window and we dont want to add a label to that (as its handled by the native framework) and we dont control the layout. So the behaviour that gets called is overridden from that composite one, to one that can do anything it wants (in this case it will set the text of the underlying native button text directly)bright-gpu-74537
12/23/2020, 9:06 AMbright-gpu-74537
12/23/2020, 9:07 AMbright-gpu-74537
12/23/2020, 9:08 AMrough-house-5230
12/23/2020, 9:20 AMbright-gpu-74537
12/23/2020, 9:21 AMrough-house-5230
12/23/2020, 9:25 AMbumpy-river-98721
12/23/2020, 9:44 AMbumpy-river-98721
12/23/2020, 9:45 AMbumpy-river-98721
12/23/2020, 9:46 AMbright-gpu-74537
12/23/2020, 9:47 AMbumpy-river-98721
12/23/2020, 9:47 AMbumpy-river-98721
12/23/2020, 9:47 AMbright-gpu-74537
12/23/2020, 9:48 AMhaxe
coins = new FlxTypedGroup<Coin>();
add(coins);bright-gpu-74537
12/23/2020, 9:48 AMbumpy-river-98721
12/23/2020, 9:48 AMbumpy-river-98721
12/23/2020, 9:49 AMbright-gpu-74537
12/23/2020, 9:49 AMbright-gpu-74537
12/23/2020, 9:50 AMbumpy-river-98721
12/23/2020, 9:51 AMbumpy-river-98721
12/23/2020, 9:52 AMbright-gpu-74537
12/23/2020, 9:52 AMbright-gpu-74537
12/23/2020, 9:52 AMbumpy-river-98721
12/23/2020, 9:53 AMbumpy-river-98721
12/23/2020, 9:53 AMbright-gpu-74537
12/23/2020, 9:53 AMbright-gpu-74537
12/23/2020, 9:53 AMbright-gpu-74537
12/23/2020, 9:54 AMbumpy-river-98721
12/23/2020, 9:55 AMbright-gpu-74537
12/23/2020, 9:55 AM