xoreos
0.0.5
|
#include <loadprogress.h>
Public Member Functions | |
LoadProgress (size_t steps) | |
Create a load progress display. More... | |
~LoadProgress () | |
void | step (const Common::UString &description) |
Take a step in advancing the progress. More... | |
Static Private Member Functions | |
static Common::UString | createProgressbar (size_t length, double filled) |
static Common::UString | createProgressbarUpper (size_t length) |
static Common::UString | createProgressbarLower (size_t length) |
Private Attributes | |
size_t | _steps |
The number of total steps. More... | |
size_t | _currentStep |
The current step we're on. More... | |
double | _stepAmount |
The amount to step each time. More... | |
double | _currentAmount |
The accumulated amount. More... | |
uint32 | _startTime |
The timestamp the first step happened. More... | |
Common::ScopedPtr< Graphics::Aurora::Text > | _description |
The text containing the description of the current step. More... | |
Common::ScopedPtr< Graphics::Aurora::Text > | _barUpper |
The upper border of the progress bar. More... | |
Common::ScopedPtr< Graphics::Aurora::Text > | _barLower |
The lower border of the progress bar. More... | |
Common::ScopedPtr< Graphics::Aurora::Text > | _progressbar |
The actual progress bar. More... | |
Common::ScopedPtr< Graphics::Aurora::Text > | _percent |
The text containing the current percentage of done-ness. More... | |
Static Private Attributes | |
static const int | kBarLength = 50 |
The length of the progress bar in characters. More... | |
Definition at line 41 of file loadprogress.h.
Engines::LoadProgress::LoadProgress | ( | size_t | steps | ) |
Create a load progress display.
steps specifies the number of steps that are gone through in the process of loading the game. The very first step is the 0% mark, the very last the 100% mark. Obviously, there needs to be at least two steps.
An example with five steps:
Definition at line 41 of file loadprogress.cpp.
References _barLower, _barUpper, _currentAmount, _description, _percent, _progressbar, _stepAmount, _steps, createProgressbar(), createProgressbarLower(), createProgressbarUpper(), FontMan, Graphics::Aurora::FontHandle::getFont(), Graphics::Font::getHeight(), kBarLength, Graphics::Aurora::kHAlignCenter, Graphics::Aurora::kSystemFontMono, Graphics::Aurora::kVAlignBottom, Graphics::Aurora::kVAlignMiddle, Graphics::Aurora::kVAlignTop, Common::ScopedPtrBase< T, Deallocator >::reset(), and WindowMan.
Engines::LoadProgress::~LoadProgress | ( | ) |
Definition at line 72 of file loadprogress.cpp.
|
staticprivate |
Definition at line 121 of file loadprogress.cpp.
Referenced by LoadProgress(), and step().
|
staticprivate |
Definition at line 143 of file loadprogress.cpp.
Referenced by LoadProgress().
|
staticprivate |
Definition at line 138 of file loadprogress.cpp.
Referenced by LoadProgress().
void Engines::LoadProgress::step | ( | const Common::UString & | description | ) |
Take a step in advancing the progress.
Definition at line 75 of file loadprogress.cpp.
References _barLower, _barUpper, _currentAmount, _currentStep, _description, _percent, _progressbar, _startTime, _stepAmount, _steps, Common::UString::c_str(), createProgressbar(), EventMan, Common::UString::format(), GfxMan, kBarLength, and status().
Referenced by Engines::KotOR2::KotOR2Engine::init(), Engines::Jade::JadeEngine::init(), Engines::NWN2::NWN2Engine::init(), Engines::Sonic::SonicEngine::init(), Engines::KotOR::KotOREngine::init(), Engines::DragonAge::DragonAgeEngine::init(), Engines::DragonAge2::DragonAge2Engine::init(), Engines::Witcher::WitcherEngine::init(), Engines::NWN::NWNEngine::init(), Engines::Jade::JadeEngine::initResources(), Engines::KotOR2::KotOR2Engine::initResources(), Engines::NWN2::NWN2Engine::initResources(), Engines::Sonic::SonicEngine::initResources(), Engines::DragonAge2::DragonAge2Engine::initResources(), Engines::DragonAge::DragonAgeEngine::initResources(), Engines::Witcher::WitcherEngine::initResources(), Engines::KotOR::KotOREngine::initResources(), Engines::NWN::NWNEngine::initResources(), Engines::Sonic::SonicEngine::loadLanguageFiles(), and Engines::Witcher::WitcherEngine::loadLanguageFiles().
|
private |
The lower border of the progress bar.
Definition at line 80 of file loadprogress.h.
Referenced by LoadProgress(), and step().
|
private |
The upper border of the progress bar.
Definition at line 79 of file loadprogress.h.
Referenced by LoadProgress(), and step().
|
private |
The accumulated amount.
Definition at line 71 of file loadprogress.h.
Referenced by LoadProgress(), and step().
|
private |
|
private |
The text containing the description of the current step.
Definition at line 76 of file loadprogress.h.
Referenced by LoadProgress(), and step().
|
private |
The text containing the current percentage of done-ness.
Definition at line 84 of file loadprogress.h.
Referenced by LoadProgress(), and step().
|
private |
The actual progress bar.
Definition at line 81 of file loadprogress.h.
Referenced by LoadProgress(), and step().
|
private |
The timestamp the first step happened.
Definition at line 73 of file loadprogress.h.
Referenced by step().
|
private |
The amount to step each time.
Definition at line 70 of file loadprogress.h.
Referenced by LoadProgress(), and step().
|
private |
The number of total steps.
Definition at line 67 of file loadprogress.h.
Referenced by LoadProgress(), and step().
|
staticprivate |
The length of the progress bar in characters.
Definition at line 65 of file loadprogress.h.
Referenced by LoadProgress(), and step().