full-journalist-82607
01/02/2023, 10:37 AMblue-lock-94355
01/04/2023, 11:02 AMxml
<vbox style="padding:15px;width:100%;height:100%;spacing:20px;">
<style>
* {
border: 0px solid black;
padding: 0;
}
.test1 {
background-color: red;
padding: 10px;
}
.test2 {
background-color: green;
}
.test3 {
background-color: yellow;
}
</style>
<hbox styleNames="test1" width="100px" >
<box styleNames="test2" width="100%" height="30px" />
<box styleNames="test3" width="99%" height="30px" /> <!-- wrong size -->
</hbox>
<hbox styleNames="test1" width="100px" >
<box styleNames="test2" width="100%" height="30px" />
<box styleNames="test3" width="100%" height="30px" />
</hbox>
</vbox>
bright-gpu-74537
01/04/2023, 11:05 AMhallowed-ocean-84954
01/04/2023, 3:13 PMpointer-events: none
seems to prevent the mouse clicks while the change is going on but then when I remove the style the clicks are processed - so it's like they were queued. Should I disable instead or is this broken or .... ? 2. does HaxeUI have a spinner I can use ? I know the playground has one but I cannot find the widgetbright-gpu-74537
01/04/2023, 3:24 PM<image resource="loading.gif" />
, this is because haxeui will leverage the capabilities of the host, which in this case is the browser which supports animated gifs natively. Openfl doesnt support anything like animated gifs... ... ... however you are in luck! 🙂 There is a Animation
component in core which is built off of the cross framework Canvas
component and this does support animated gifs (in fact, in only supports animated gifs currently), so this can be used to show animations on all backends: http://haxeui.org/explorer/#basic/animations
(note, you'll need to include the "format" lib which it uses for gif decoding)hallowed-ocean-84954
01/04/2023, 3:26 PMfamous-alarm-22563
01/05/2023, 1:03 AMthis.ui.findComponent("restart").onClick = function(_)
{
FlxG.switchState(new PlayState());
};
ambitious-knife-25690
01/05/2023, 1:07 AMfamous-alarm-22563
01/05/2023, 1:09 AMfamous-alarm-22563
01/05/2023, 1:10 AMambitious-knife-25690
01/05/2023, 1:13 AMambitious-knife-25690
01/05/2023, 1:13 AMambitious-knife-25690
01/05/2023, 1:15 AMfamous-alarm-22563
01/05/2023, 1:18 AMambitious-knife-25690
01/05/2023, 1:19 AMambitious-knife-25690
01/05/2023, 1:20 AMambitious-knife-25690
01/05/2023, 1:22 AMfamous-alarm-22563
01/05/2023, 1:26 AMambitious-knife-25690
01/05/2023, 1:26 AMfamous-alarm-22563
01/05/2023, 1:26 AMfamous-alarm-22563
01/05/2023, 1:27 AMgratitude += 100
hallowed-ocean-84954
01/05/2023, 4:50 AMpointer-events:none
. I think I am fairly sure my new scene switch impl should not be returning too early. But I noticed something I was doing wrong with the selector. I had thought that pointer-events could be applied to the enclosing vbox and all components below would not receive events. Seems I was wrong. So I tried this:
.loading {
filter:blur(3px);
}
.loading * {
pointer-events: none;
}
The loading
style is added the UI's outermost vbox and sure enough the blur appears and the disappears when the class is removed. But with this setup the pointer-events are never restored to the underlying checkboxes when the class is removed. I don't yet have a small test case but I think I see how I could create one.ambitious-knife-25690
01/05/2023, 6:35 PMbright-gpu-74537
01/05/2023, 7:15 PMambitious-knife-25690
01/05/2023, 7:17 PMambitious-knife-25690
01/05/2023, 7:18 PMcool-musician-79004
01/05/2023, 7:57 PMbright-gpu-74537
01/05/2023, 7:58 PMcool-musician-79004
01/05/2023, 8:00 PMcool-musician-79004
01/05/2023, 8:00 PM