mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-07-15 07:30:51 -05:00
19 lines
562 B
C++
19 lines
562 B
C++
#include "AppStates/ProgressState.hpp"
|
|
#include "Colors.hpp"
|
|
#include "SDL.hpp"
|
|
#include "StringUtil.hpp"
|
|
#include <cmath>
|
|
|
|
void ProgressState::Update(void)
|
|
{
|
|
m_ProgressBarWidth = std::ceil(720.0f * m_Task.GetCurrentProgress());
|
|
m_Progress = std::ceil(m_Task.GetCurrentProgress() * 100);
|
|
m_PercentageString = StringUtil::GetFormattedString("%u", m_Progress);
|
|
m_PerentageX = 640 - (SDL::Text::GetWidth(18, m_PercentageString.c_str()));
|
|
}
|
|
|
|
void ProgressState::Render(void)
|
|
{
|
|
SDL::RenderRectFill(NULL, 0, 0, 1280, 720, Colors::BackgroundDim);
|
|
}
|