#include <meter.h>
Public Types | |
enum | Direction { kFillToLeft, kFillToRight } |
Public Member Functions | |
Meter (int16 x, int16 y, int16 width, int16 height, uint8 frontColor, uint8 backColor, int32 maxValue, Direction direction) | |
int32 | getMaxValue () const |
int32 | getValue () const |
void | setValue (int32 value) |
void | setMaxValue () |
int32 | increase (int32 n=1) |
int32 | decrease (int32 n=1) |
void | draw (Surface &dest, int16 &left, int16 &top, int16 &right, int16 &bottom) |
A meter measuring a value.
int32 Gob::Geisha::Meter::getMaxValue | ( | ) | const |
Return the max value the meter is measuring.
int32 Gob::Geisha::Meter::getValue | ( | ) | const |
Return the current value the meter is measuring.
void Gob::Geisha::Meter::setValue | ( | int32 | value | ) |
Set the current value the meter is measuring.
void Gob::Geisha::Meter::setMaxValue | ( | ) |
Set the current value the meter is measuring to the max value.
int32 Gob::Geisha::Meter::increase | ( | int32 | n = 1 | ) |
Increase the current value the meter is measuring, returning the overflow.
int32 Gob::Geisha::Meter::decrease | ( | int32 | n = 1 | ) |
Decrease the current value the meter is measuring, returning the underflow.
void Gob::Geisha::Meter::draw | ( | Surface & | dest, |
int16 & | left, | ||
int16 & | top, | ||
int16 & | right, | ||
int16 & | bottom | ||
) |
Draw the meter onto the surface and return the affected rectangle.