mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-07-14 23:21:17 -05:00
24 lines
624 B
C++
24 lines
624 B
C++
#include "AppStates/TaskState.hpp"
|
|
#include "Colors.hpp"
|
|
#include "SDL.hpp"
|
|
|
|
void TaskState::Update(void)
|
|
{
|
|
if (!m_Task.IsRunning())
|
|
{
|
|
AppState::Deactivate();
|
|
}
|
|
}
|
|
|
|
void TaskState::Render(void)
|
|
{
|
|
// Grab task string.
|
|
std::string Status = m_Task.GetStatus();
|
|
// Center so it looks perty
|
|
int StatusX = 640 - (SDL::Text::GetWidth(18, Status.c_str()) / 2);
|
|
// Dim the background states.
|
|
SDL::RenderRectFill(NULL, 0, 0, 1280, 720, Colors::BackgroundDim);
|
|
// Render the status.
|
|
SDL::Text::Render(NULL, StatusX, 351, 18, SDL::Text::NO_TEXT_WRAP, Colors::White, Status.c_str());
|
|
}
|