I have a game system where I first create a nifty GUI object. The user enters the parameters of the game and after the start button is clicked the game is loaded. However, I want the GUI screen to display the text “Loading…” before the game is loaded. I used the below code, but it seems that the text is only displayed after the finishloading method (the parent variable refers to the Main class).
I have a game system where I first create a nifty GUI object. The user enters the parameters of the game and after the start button is clicked the game is loaded. However, I want the GUI screen to display the text “Loading…” before the game is loaded. I used the below code, but it seems that the text is only displayed after the finishloading method (the parent variable refers to the Main class).
I assume it has something to do with rendering loops but I’m not sure how to solve this problem. Any help is appreciated.
If you are not loading your game on a background thread… then your locking the render thread and there is nothing that can be done. Push the whole process to a seperate thread (the loading process that is) and use callables to send any updates need. This way you can still make visual changes while your app is busy doing other things.
EDIT: Just to clarify… this is not a Nifty issue. This will happen with any onscreen changes you attempt to make.