Implement changing working directory.

This commit is contained in:
J-D-K
2025-08-18 21:09:11 -04:00
parent e52e01a306
commit e025901b0b
12 changed files with 68 additions and 21 deletions

View File

@@ -10,15 +10,8 @@ namespace
void DataLoadingState::update()
{
static constexpr int SCREEN_CENTER = 640;
const std::string status = m_task->get_status();
const int statusWidth = sdl::text::get_width(22, status);
m_statusX = SCREEN_CENTER - (statusWidth / 2);
BaseTask::update_loading_glyph();
if (!m_task->is_running()) { DataLoadingState::deactivate_state(); }
m_context.process_icon_queue();
}
@@ -28,9 +21,12 @@ void DataLoadingState::render()
static constexpr int ICON_Y_COORD = 226;
const std::string status = m_task->get_status();
const int statusWidth = sdl::text::get_width(BaseTask::FONT_SIZE, status);
m_statusX = SCREEN_CENTER - (statusWidth / 2);
sdl::render_rect_fill(sdl::Texture::Null, 0, 0, 1280, 720, colors::CLEAR_COLOR);
sm_jksvIcon->render(sdl::Texture::Null, ICON_X_COORD, ICON_Y_COORD);
sdl::text::render(sdl::Texture::Null, m_statusX, 673, 22, sdl::text::NO_WRAP, colors::WHITE, status);
sdl::text::render(sdl::Texture::Null, m_statusX, 673, BaseTask::FONT_SIZE, sdl::text::NO_WRAP, colors::WHITE, status);
BaseTask::render_loading_glyph();
}