Interface implemented by each full-screen mode (Lobby, Game).
More...
#include <IScreen.hpp>
|
| virtual | ~IScreen ()=default |
| virtual SDL_AppResult | event (SDL_Event *event)=0 |
| | Handle an incoming SDL event.
|
| virtual SDL_AppResult | iterate ()=0 |
| | Update the screen state and render the next frame.
|
| virtual void | quit ()=0 |
| | Perform any necessary cleanup before the screen is destroyed.
|
| virtual void | shutdownAfterRenderer () |
| | Perform cleanup that must happen after the App-owned renderer shuts down.
|
Interface implemented by each full-screen mode (Lobby, Game).
App owns one active IScreen at a time and delegates SDL event processing, per-frame iteration, and shutdown to it.
◆ ~IScreen()
| virtual IScreen::~IScreen |
( |
| ) |
|
|
virtualdefault |
◆ beginMenuFrame()
Start a new ImGui frame and paint the shared menu background.
◆ event()
| virtual SDL_AppResult IScreen::event |
( |
SDL_Event * | event | ) |
|
|
pure virtual |
◆ handleSystemMenuEvent()
Handle Escape-toggle of a SystemMenuOverlay and forward consumed events.
- Returns
- true if the overlay handled the event and the caller should return SDL_APP_CONTINUE without further processing.
◆ iterate()
| virtual SDL_AppResult IScreen::iterate |
( |
| ) |
|
|
pure virtual |
◆ presentMenuFrame()
| void IScreen::presentMenuFrame |
( |
NewRenderer & | renderer | ) |
|
|
staticprotected |
Render the ImGui draw data and present a default-camera frame.
◆ processCommonImguiEvent()
| SDL_AppResult IScreen::processCommonImguiEvent |
( |
SDL_Event * | event | ) |
|
|
staticprotected |
Forward event to ImGui and detect SDL_EVENT_QUIT.
- Returns
- SDL_APP_SUCCESS on quit; SDL_APP_CONTINUE otherwise. Callers should early-return when the result is not SDL_APP_CONTINUE.
◆ quit()
| virtual void IScreen::quit |
( |
| ) |
|
|
pure virtual |
◆ shutdownAfterRenderer()
| virtual void IScreen::shutdownAfterRenderer |
( |
| ) |
|
|
inlinevirtual |
Perform cleanup that must happen after the App-owned renderer shuts down.
Reimplemented in Game.
The documentation for this class was generated from the following files: