ScummVM API documentation
Gob::Geisha::Meter Class Reference

#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)
 

Detailed Description

A meter measuring a value.

Member Function Documentation

◆ getMaxValue()

int32 Gob::Geisha::Meter::getMaxValue ( ) const

Return the max value the meter is measuring.

◆ getValue()

int32 Gob::Geisha::Meter::getValue ( ) const

Return the current value the meter is measuring.

◆ setValue()

void Gob::Geisha::Meter::setValue ( int32  value)

Set the current value the meter is measuring.

◆ setMaxValue()

void Gob::Geisha::Meter::setMaxValue ( )

Set the current value the meter is measuring to the max value.

◆ increase()

int32 Gob::Geisha::Meter::increase ( int32  n = 1)

Increase the current value the meter is measuring, returning the overflow.

◆ decrease()

int32 Gob::Geisha::Meter::decrease ( int32  n = 1)

Decrease the current value the meter is measuring, returning the underflow.

◆ draw()

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.


The documentation for this class was generated from the following file: