You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Long story short, I replaced the game ui and loading screens with HTML but once the levels are done loading I want to hide the loading screen. OnLevelLoadingFinished gets invoked once the loading screens are done but not sure on how to make a proper implementation for it.
I haven't been able to find anything to make a class that inherits from IGameUI to be able to receive the OnLevelLoadingFinished call and do something from there depending on the bError / failureReason result. As a last resort I decided to do some hideous thing like getting the IGameUI vtable, replacing the OnLevelLoadingFinished member for one of mine and calling back the original function but that's not how you should do things.
Thanks in advance.
The text was updated successfully, but these errors were encountered:
colistro123
changed the title
[Question] How do you properly 'hook' IGameUI::OnLevelLoadingFinished?
[Question] How do you properly make an implementation based on IGameUI::OnLevelLoadingFinished?
Mar 12, 2017
@BerntA Thanks, yeah I'm doing this to set the html panels as the backgrounds, problem is that I have another panel that needs triggering once the game is either:
A: Done loading a level.
B: Fails to load a level.
As I said before there's OnLevelLoadingFinished in the IGameUI class but I couldn't find anything to make a class that inherits from that one so I know when OnLevelLoadingFinished is called.
I temporarily solved it by getting the loading state bool from GameUI (which is set to true once a level is loading and then set to false when the loading finishes or fails) and checking it in an UpdateFrame function but that's a really 'hacky' workaround I shouldn't be doing.
Long story short, I replaced the game ui and loading screens with HTML but once the levels are done loading I want to hide the loading screen. OnLevelLoadingFinished gets invoked once the loading screens are done but not sure on how to make a proper implementation for it.
I haven't been able to find anything to make a class that inherits from IGameUI to be able to receive the OnLevelLoadingFinished call and do something from there depending on the bError / failureReason result. As a last resort I decided to do some hideous thing like getting the IGameUI vtable, replacing the OnLevelLoadingFinished member for one of mine and calling back the original function but that's not how you should do things.
Thanks in advance.
The text was updated successfully, but these errors were encountered: