19 #ifndef OPENXCOM_BAR_H
20 #define OPENXCOM_BAR_H
22 #include "../Engine/Surface.h"
36 Uint8 _color, _color2;
37 double _scale, _max, _value, _value2;
38 bool _invert, _secondOnTop;
41 Bar(
int width,
int height,
int x = 0,
int y = 0);
Uint8 getColor2() const
Gets the bar's second color.
Definition: Bar.cpp:78
void setValue2(double value)
Sets the bar's second current value.
Definition: Bar.cpp:144
double getValue() const
Gets the bar's current value.
Definition: Bar.cpp:135
void setScale(double scale)
Sets the bar's scale.
Definition: Bar.cpp:87
Uint8 getColor() const
Gets the bar's color.
Definition: Bar.cpp:59
void setMax(double max)
Sets the bar's maximum value.
Definition: Bar.cpp:106
Bar graphic that represents a certain value.
Definition: Bar.h:33
double getValue2() const
Gets the bar's second current value.
Definition: Bar.cpp:154
void setValue(double value)
Sets the bar's current value.
Definition: Bar.cpp:125
void setColor2(Uint8 color)
Sets the bar's second color.
Definition: Bar.cpp:68
void draw()
Draws the bar.
Definition: Bar.cpp:183
double getMax() const
Gets the bar's maximum value.
Definition: Bar.cpp:116
Element that is blit (rendered) onto the screen.
Definition: Surface.h:39
Bar(int width, int height, int x=0, int y=0)
Creates a new bar with the specified size and position.
Definition: Bar.cpp:33
void invert(Uint8 mid)
Inverts the surface's colors.
Definition: Surface.cpp:451
~Bar()
Cleans up the bar.
Definition: Bar.cpp:41
void setInvert(bool invert)
Sets the bar's color invert setting.
Definition: Bar.cpp:173
void setSecondValueOnTop(bool onTop)
Defines whether the second value should be drawn on top.
Definition: Bar.cpp:163
void setColor(Uint8 color)
Sets the bar's color.
Definition: Bar.cpp:49
double getScale() const
Gets the bar's scale.
Definition: Bar.cpp:97