latest state

This commit is contained in:
2025-12-06 09:43:33 +01:00
parent 294e935344
commit b44de25113
19 changed files with 2451 additions and 524 deletions

View File

@ -5,6 +5,7 @@
#include <vector>
#include <functional>
#include <string>
#include <array>
// Forward declarations for frequently used types
class Game;
@ -66,6 +67,12 @@ struct StateContext {
std::function<void(AppState)> requestFadeTransition; // Generic state fade requests (menu/options/level)
// Pointer to the application's StateManager so states can request transitions
StateManager* stateManager = nullptr;
// Optional explicit per-button coordinates (logical coordinates). When
// `menuButtonsExplicit` is true, MenuState will use these centers for
// rendering and hit tests. Values are in logical units (LOGICAL_W/H).
std::array<float, 4> menuButtonCX{};
std::array<float, 4> menuButtonCY{};
bool menuButtonsExplicit = false;
};
class State {