Front-end screen displayed while the client is about to enter gameplay.
More...
#include <LoadingScreen.hpp>
|
| bool | init (AppContext &ctx) |
| | Bind borrowed app resources and capture display metadata.
|
| SDL_AppResult | event (SDL_Event *event) override |
| | Handle an incoming SDL event.
|
| SDL_AppResult | iterate () override |
| | Update the screen state and render the next frame.
|
| void | quit () override |
| | Perform any necessary cleanup before the screen is destroyed.
|
| bool | readyToStartGame () const |
| | True after at least one loading frame has been submitted.
|
| virtual | ~IScreen ()=default |
| virtual void | shutdownAfterRenderer () |
| | Perform cleanup that must happen after the App-owned renderer shuts down.
|
Front-end screen displayed while the client is about to enter gameplay.
◆ event()
| SDL_AppResult LoadingScreen::event |
( |
SDL_Event * | event | ) |
|
|
overridevirtual |
Handle an incoming SDL event.
- Parameters
-
| event | The SDL event to process. |
- Returns
- SDL_APP_CONTINUE to keep running, SDL_APP_FAILURE to exit.
Implements IScreen.
◆ init()
Bind borrowed app resources and capture display metadata.
◆ iterate()
| SDL_AppResult LoadingScreen::iterate |
( |
| ) |
|
|
overridevirtual |
Update the screen state and render the next frame.
- Returns
- SDL_APP_CONTINUE to keep running, SDL_APP_FAILURE to exit.
Implements IScreen.
◆ quit()
| void LoadingScreen::quit |
( |
| ) |
|
|
overridevirtual |
Perform any necessary cleanup before the screen is destroyed.
Implements IScreen.
◆ readyToStartGame()
| bool LoadingScreen::readyToStartGame |
( |
| ) |
const |
True after at least one loading frame has been submitted.
◆ renderedFrame
| bool LoadingScreen::renderedFrame = false |
|
private |
◆ renderer
Shared renderer; not owned.
◆ serverName
| std::string LoadingScreen::serverName |
|
private |
Display name for the connected server.
◆ window
| SDL_Window* LoadingScreen::window = nullptr |
|
private |
Application window; not owned.
The documentation for this class was generated from the following files: