template<typename TStateId> asge::game::state::GameStateStack
A stack of non-owning IGameState pointers driving Update/Render/event dispatch.
#include <GameStateStack.hpp>Ownership stays with the caller (typically Game<TStateId>'s state cache) — PushRaw/PopRaw/ReplaceRaw only ever store/erase raw pointers and fire OnEnter/OnExit at the right time. See IGameState's doc comment for how Update, Render, and OnSystemEvent each traverse the stack differently.
Public Types
using StateType = IGameState< TStateId >Private Attributes
Private Member Functions
Index of the lowest state Render() draws; the stack must be non-empty for it to be meaningful.
Public Member Functions
Calls inState->OnEnter() and pushes it as the new topmost state.
Pops the current top (if any) and pushes inState in its place, at the same depth.
std::optional< Transition< TStateId > > Update(float inDeltaTime, input::InputState const &inInput) noexceptUpdates states top-down, stopping after the first whose BlocksUpdateBelow() is true; the topmost requested transition wins.
Renders bottom-up over the visible range: walks down from the top while each state's RendersBelow() lets what's under it show through, then draws that range back up so layering is correct.
Same traversal as Render(), calling each visible state's RenderBackground() instead.
Dispatches inSysEvent to the topmost state only.
No-op on an empty stack.
graphics::RGBA_Color ClearColor() const noexceptThe bottom-most visible state's ClearColor(); black on an empty stack.