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

@@ -19,12 +19,17 @@ namespace
constexpr std::string_view SECONDARY_TARGET = "SecondaryTarget";
} // namespace
// ---- Construction ----
TitleSelectState::TitleSelectState(data::User *user)
: TitleSelectCommon()
, m_user(user)
, m_renderTarget(sdl::TextureManager::load(SECONDARY_TARGET, 1080, 555, SDL_TEXTUREACCESS_TARGET))
, m_titleView(ui::TitleView::create(m_user)) {};
// ---- Public functions ----
void TitleSelectState::update()
{
if (!TitleSelectState::title_count_check()) { return; }
@@ -60,6 +65,8 @@ void TitleSelectState::render()
void TitleSelectState::refresh() { m_titleView->refresh(); }
// ---- Private functions ----
bool TitleSelectState::title_count_check()
{
const int titleCount = m_user->get_total_data_entries();