Public Member Functions | Public Attributes | List of all members
pProgressBar Class Reference

Progress bar class. More...

#include <primitiveGui.h>

Inheritance diagram for pProgressBar:
pWidget

Public Member Functions

 pProgressBar (float x, float y, float width, float height)
 
void setColors (sf::Color borderColor, sf::Color fillColor, sf::Color barColor)
 
void setValue (float value)
 
float getValue ()
 
virtual void updateWidget ()
 
- Public Member Functions inherited from pWidget
 pWidget (float x, float y, float width, float height)
 
void setGeometry (float x, float y, float width, float height)
 
void setVisiblity (bool visiblity)
 

Public Attributes

float value
 Current value of progress bar.
 
pText progressBarLabel
 Text on progress bar.
 
sf::Color borderColor
 Border color of progress bar - default ( 117, 119, 114, 255 )
 
sf::Color fillColor
 Background of widget shape - default ( 81, 78, 45, 255 )
 
sf::Color barColor
 Background of progress rect shape - default ( 81, 130, 66, 255 )
 
- Public Attributes inherited from pWidget
int widgetId
 Widget unique index.
 
int widgetOnWindowId
 If widget is on some window this is a unique index of this window ( it's widgetId of this window ) else it is -1.
 
bool visiblity
 visibility of widget
 
widgetTypeEnum widgetType
 Type of the widget.
 
widgetEventType widgetEvent
 Type of the event.
 
sf::Vector2f widgetPosition
 Position of widget.
 
sf::Vector2f widgetSize
 Size of widget.
 

Additional Inherited Members

- Public Types inherited from pWidget
enum  widgetTypeEnum {
  Button =0, TextEdit, CheckBox, Slider,
  ProgressBar, Window
}
 Enumeration of the different types of widgets. More...
 
enum  widgetEventType { NoEvent =0, WidgetClicked }
 Enumeration of the different types of widgets. More...
 

Detailed Description

Progress bar class.

This class inherits of pWidget class.

This is a basic progress bar. It contains only two rectangles and text :P

Constructor & Destructor Documentation

pProgressBar::pProgressBar ( float  x,
float  y,
float  width,
float  height 
)

Default constructor.

Parameters
x
y
width
height

Member Function Documentation

float pProgressBar::getValue ( )

Get current value of progress bar

Returns
float
void pProgressBar::setColors ( sf::Color  borderColor,
sf::Color  fillColor,
sf::Color  barColor 
)

Set progress bar colors

Parameters
borderColor
fillColor
barColor
void pProgressBar::setValue ( float  value)

Set value of progress bar

Parameters
value
void pProgressBar::updateWidget ( )
virtual

Update widget. Every widget have own impementation of this function, because some widgets have more elements to draw.

Implements pWidget.


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