Add comments to states.

This commit is contained in:
J-D-K
2025-10-30 13:34:03 -04:00
parent 17410fd8a9
commit ec2417d068
32 changed files with 226 additions and 34 deletions

View File

@@ -33,6 +33,8 @@ namespace
// Definition at bottom.
static void finish_reinitialization();
// ---- Construction ----
ExtrasMenuState::ExtrasMenuState()
: m_renderTarget(sdl::TextureManager::load(SECONDARY_TARGET, 1080, 555, SDL_TEXTUREACCESS_TARGET))
, m_controlGuide(ui::ControlGuide::create(strings::get_by_name(strings::names::CONTROL_GUIDES, 5)))
@@ -40,6 +42,8 @@ ExtrasMenuState::ExtrasMenuState()
ExtrasMenuState::initialize_menu();
}
// ---- Public functions ----
void ExtrasMenuState::update()
{
const bool hasFocus = BaseState::has_focus();
@@ -77,6 +81,8 @@ void ExtrasMenuState::render()
m_controlGuide->render(sdl::Texture::Null, hasFocus);
}
// ---- Private functions ----
void ExtrasMenuState::initialize_menu()
{
if (!m_extrasMenu) { m_extrasMenu = ui::Menu::create(32, 10, 1000, 23, 555); }