Code style update.

This commit is contained in:
J-D-K
2025-02-21 13:31:40 -05:00
parent 88e66992ed
commit 11672043c3
71 changed files with 1027 additions and 810 deletions

View File

@@ -10,19 +10,19 @@
void ProgressState::update(void)
{
if (m_task.isRunning() && input::buttonPressed(HidNpadButton_Plus))
if (m_task.is_running() && input::button_pressed(HidNpadButton_Plus))
{
ui::PopMessageManager::pushMessage(ui::PopMessageManager::DEFAULT_MESSAGE_TICKS,
strings::getByName(strings::names::POP_MESSAGES_BACKUP_MENU, 0));
ui::PopMessageManager::push_message(ui::PopMessageManager::DEFAULT_MESSAGE_TICKS,
strings::get_by_name(strings::names::POP_MESSAGES_BACKUP_MENU, 0));
}
else if (!m_task.isRunning())
else if (!m_task.is_running())
{
AppState::deactivate();
}
m_progressBarWidth = std::ceil(656.0f * m_task.getCurrent());
m_progress = std::ceil(m_task.getCurrent() * 100);
m_percentageString = stringutil::getFormattedString("%u", m_progress);
m_progressBarWidth = std::ceil(656.0f * m_task.get_current());
m_progress = std::ceil(m_task.get_current() * 100);
m_percentageString = stringutil::get_formatted_string("%u", m_progress);
m_percentageX = 640 - (sdl::text::getWidth(18, m_percentageString.c_str()));
}
@@ -32,9 +32,16 @@ void ProgressState::render(void)
sdl::renderRectFill(NULL, 0, 0, 1280, 720, colors::DIM_BACKGROUND);
// Render the dialog and little loading bar thingy.
ui::renderDialogBox(NULL, 280, 262, 720, 256);
sdl::text::render(NULL, 312, 288, 18, 648, colors::WHITE, m_task.getStatus().c_str());
ui::render_dialog_box(NULL, 280, 262, 720, 256);
sdl::text::render(NULL, 312, 288, 18, 648, colors::WHITE, m_task.get_status().c_str());
sdl::renderRectFill(NULL, 312, 462, 656, 32, colors::BLACK);
sdl::renderRectFill(NULL, 312, 462, m_progressBarWidth, 32, colors::GREEN);
sdl::text::render(NULL, m_percentageX, 468, 18, sdl::text::NO_TEXT_WRAP, colors::WHITE, "%s%%", m_percentageString.c_str());
sdl::text::render(NULL,
m_percentageX,
468,
18,
sdl::text::NO_TEXT_WRAP,
colors::WHITE,
"%s%%",
m_percentageString.c_str());
}