bright-gpu-74537
08/06/2021, 8:12 PMuser
08/06/2021, 8:13 PMbright-gpu-74537
08/06/2021, 8:13 PMbright-gpu-74537
08/06/2021, 9:30 PMbright-gpu-74537
08/06/2021, 9:31 PMsilly-pizza-19516
08/08/2021, 4:31 AMhaxe
mainView.addEventListener(KeyboardEvent.KEY_UP, function(e:KeyboardEvent){
Toolkit.messageBox("You pressed: " + e.keyCode);
});
This will compile but the event is never activated, I'm not sure if this is the correct way to do this or if it's an environment specific issue (for reference, backend is openfl).bright-gpu-74537
08/08/2021, 6:04 AMsilly-pizza-19516
08/08/2021, 6:45 AMaddEventListener(), which worked but only if an interactable component (in this case a text field) was in focus. I then realised that if I added an event listener to the openfl stage, that would probably do what I wanted, so I went to the toolkit documentation.
Using Toolkit.screen.registerEvent(...) with the openfl events compiled but didn't work, so out of curiosity I reverted back to using the haxeui keyboard event and boom, that does exactly what I wanted.bright-gpu-74537
08/08/2021, 6:47 AMbright-gpu-74537
08/08/2021, 7:12 AMbright-gpu-74537
08/08/2021, 4:36 PMbright-gpu-74537
08/08/2021, 4:36 PMbright-gpu-74537
08/08/2021, 4:38 PMbright-gpu-74537
08/08/2021, 4:38 PM* { native: true })purple-businessperson-14467
08/08/2021, 7:37 PMuser
08/08/2021, 7:38 PMstaticTextRef.ptr.create()
- applyStyle never manage to update text align after the fact
Any idea what I could try? :xbright-gpu-74537
08/08/2021, 7:38 PMbright-gpu-74537
08/08/2021, 7:40 PMbright-gpu-74537
08/08/2021, 7:41 PMuser
08/08/2021, 7:42 PM<label style="text-align: center" text="foo" width="100%" /> without coconutbright-gpu-74537
08/08/2021, 7:44 PMuser
08/08/2021, 7:44 PMbright-gpu-74537
08/08/2021, 7:44 PMbright-gpu-74537
08/08/2021, 7:44 PMbright-gpu-74537
08/08/2021, 7:58 PMuser
08/08/2021, 8:03 PMuser
08/08/2021, 8:13 PMbright-gpu-74537
08/08/2021, 8:14 PMuser
08/08/2021, 8:15 PMbright-gpu-74537
08/08/2021, 8:21 PM