mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-09-12 20:45:11 -05:00
Minor code revisions.
This commit is contained in:
@@ -13,29 +13,8 @@ namespace
|
||||
|
||||
BaseTask::BaseTask()
|
||||
: BaseState(false)
|
||||
, m_popUnableExit(strings::get_by_name(strings::names::GENERAL_POPS, 0))
|
||||
{
|
||||
m_frameTimer.start(TICKS_GLYPH_TRIGGER);
|
||||
}
|
||||
|
||||
void BaseTask::update()
|
||||
{
|
||||
const bool plusPressed = input::button_pressed(HidNpadButton_Plus);
|
||||
|
||||
if (!m_task->is_running())
|
||||
{
|
||||
BaseState::deactivate();
|
||||
return;
|
||||
}
|
||||
else if (plusPressed) { ui::PopMessageManager::push_message(ui::PopMessageManager::DEFAULT_TICKS, m_popUnableExit); }
|
||||
|
||||
BaseTask::update_loading_glyph();
|
||||
}
|
||||
|
||||
void BaseTask::render_loading_glyph()
|
||||
{
|
||||
sdl::text::render(sdl::Texture::Null, 56, 673, 32, sdl::text::NO_WRAP, m_colorMod, sm_glyphArray[m_currentFrame]);
|
||||
}
|
||||
, m_frameTimer(TICKS_GLYPH_TRIGGER)
|
||||
, m_popUnableExit(strings::get_by_name(strings::names::GENERAL_POPS, 0)) {};
|
||||
|
||||
void BaseTask::update_loading_glyph()
|
||||
{
|
||||
@@ -44,3 +23,15 @@ void BaseTask::update_loading_glyph()
|
||||
if (!m_frameTimer.is_triggered()) { return; }
|
||||
if (++m_currentFrame % 8 == 0) { m_currentFrame = 0; }
|
||||
}
|
||||
|
||||
void BaseTask::pop_on_plus()
|
||||
{
|
||||
const bool plusPressed = input::button_pressed(HidNpadButton_Plus);
|
||||
|
||||
if (plusPressed) { ui::PopMessageManager::push_message(ui::PopMessageManager::DEFAULT_TICKS, m_popUnableExit); }
|
||||
}
|
||||
|
||||
void BaseTask::render_loading_glyph()
|
||||
{
|
||||
sdl::text::render(sdl::Texture::Null, 56, 673, 32, sdl::text::NO_WRAP, m_colorMod, sm_glyphArray[m_currentFrame]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user