bright-gpu-74537
07/01/2019, 10:10 AMbright-gpu-74537
07/01/2019, 10:11 AMquick-king-64105
07/01/2019, 10:13 AMactive
to false for the parent state, which had been the expectation many of my premises were based on. Why I'm too stupid to check such things is beyond me. 𤦠Anyway, what it does do is if you check the logic, only the substate really seems to get updated while it's open, while the parent just kinda sits there doing a lot of nothing. It's written so that it checks to see if there's a substate and then... if substate - update substate... if not substate, update self. Well, something like that, anyway. I'm not quite awake yet, and a maintainer could give much better than I could just glancing at it.quick-king-64105
07/01/2019, 10:13 AMquick-king-64105
07/01/2019, 10:14 AMbright-gpu-74537
07/01/2019, 10:14 AMquick-king-64105
07/01/2019, 10:14 AMquick-king-64105
07/01/2019, 10:14 AMbright-gpu-74537
07/01/2019, 10:14 AMquick-king-64105
07/01/2019, 10:15 AMbright-gpu-74537
07/01/2019, 10:15 AMquick-king-64105
07/01/2019, 10:23 AMquick-king-64105
07/01/2019, 10:25 AMhaxe
if (persistentUpdate || subState == null)
for the state itself. You can find this on line 171 in FlxState, as part of its logic for handling update checking around substates.
Specific implementation from that note I don't know. But it appears that properly setting substates to null when they're closed is going on, and that would mean that check is the one we're interested in here.quick-king-64105
07/01/2019, 10:25 AMquick-king-64105
07/01/2019, 10:40 AMbrave-kangaroo-30399
07/01/2019, 11:03 AMbrave-kangaroo-30399
07/01/2019, 11:04 AMbrave-kangaroo-30399
07/01/2019, 11:06 AMbrave-kangaroo-30399
07/01/2019, 11:06 AMquick-king-64105
07/01/2019, 11:20 AMquick-king-64105
07/01/2019, 11:21 AMquick-king-64105
07/01/2019, 11:21 AMquick-king-64105
07/01/2019, 11:22 AMquick-king-64105
07/01/2019, 11:23 AMquick-king-64105
07/01/2019, 11:41 AMquick-king-64105
07/01/2019, 11:41 AMhaxe
public function onClick_faq(ignored:UIEvent):Void
{
FlxG.log.add(this.doHxui);
if (this.doHxui)
{
FlxG.log.add("Oops I did it again!");
var faqSubstate:FAQSubstate = new FAQSubstate(0x80000000);
openSubState(faqSubstate);
}
}
quick-king-64105
07/01/2019, 11:41 AMquick-king-64105
07/01/2019, 11:43 AMhaxe
class FlxHaxeUiState extends FlxState
{
/**
* Whether or not we should be doing Haxeui things.
*
* It's expected this will be checked manually.
*/
public var doHxui:Bool = true;
override public function create():Void
{
// cut for brevity
}
override function openSubState(SubState:FlxSubState)
{
this.doHxui = false;
super.openSubState(SubState);
}
override function closeSubState()
{
this.doHxui = true;
super.closeSubState();
}
}
quick-king-64105
07/01/2019, 11:44 AMquick-king-64105
07/01/2019, 11:44 AM