42 _currentAmount(0.0f), _startTime(0) {
54 float left = -(
WindowMan.getWindowWidth() / 2.0f);
65 _percent ->setPosition(left, -height);
122 const size_t amount = length * filled;
The global graphics manager.
A class holding an UTF-8 string.
LoadProgress(size_t steps)
Create a load progress display.
void reset(PointerType o=0)
Resets the pointer with the new value.
double _currentAmount
The accumulated amount.
static Common::UString createProgressbarUpper(size_t length)
size_t _steps
The number of total steps.
size_t _currentStep
The current step we're on.
static Common::UString createProgressbarLower(size_t length)
Common::ScopedPtr< Graphics::Aurora::Text > _progressbar
The actual progress bar.
const char * c_str() const
Return the (utf8 encoded) string data.
static UString format(const char *s,...) GCC_PRINTF(1
Print formatted data into an UString object, similar to sprintf().
Utility templates and functions.
uint32 _startTime
The timestamp the first step happened.
The global events manager.
const char * kSystemFontMono
Identifier used for the monospaced system font.
Common::ScopedPtr< Graphics::Aurora::Text > _barUpper
The upper border of the progress bar.
const float kVAlignBottom
const float kHAlignCenter
#define EventMan
Shortcut for accessing the events manager.
Displaying the progress in loading a game.
const float kVAlignMiddle
#define WindowMan
Shortcut for accessing the window manager.
static Common::UString createProgressbar(size_t length, double filled)
Common::ScopedPtr< Graphics::Aurora::Text > _percent
The text containing the current percentage of done-ness.
void step(const Common::UString &description)
Take a step in advancing the progress.
Common::ScopedPtr< Graphics::Aurora::Text > _barLower
The lower border of the progress bar.
void status(const char *s,...)
Common::ScopedPtr< Graphics::Aurora::Text > _description
The text containing the description of the current step.
static const int kBarLength
The length of the progress bar in characters.
double _stepAmount
The amount to step each time.
virtual float getHeight() const =0
Return the height of a character.
#define GfxMan
Shortcut for accessing the graphics manager.
#define FontMan
Shortcut for accessing the font manager.