dEngine
Simple 2D C++ game engine
|
A horizontal progress bar Variables are: xpos - The x position of the progress bar ypos - The y position of the progress bar completed - The amount completed on a scale of 0 - 100. More...
#include <ProgressBarH.h>
Public Member Functions | |
void | Setup (dengine::Vec2 initPos, int initAmount=0) |
Initializes required parameters. More... | |
void | SetFillColor (SDL_Color color) |
Sets the fill color of the progress bar. More... | |
void | Render () override |
The render method of a component. More... | |
void | Update () override |
The update method of a component. More... | |
void | SetCompleted (int completeAmount) |
Sets the filled progress of the progress bar. More... | |
![]() | |
void | SetDrawColor (SDL_Color color) |
Set Draw Color. More... | |
Private Attributes | |
int | completed |
dengine::Vec2 | position |
SDL_Color | fillColor |
Additional Inherited Members | |
![]() | |
std::string | GetVar (std::string key) |
![]() | |
SDL_Color | drawColor |
A horizontal progress bar Variables are: xpos - The x position of the progress bar ypos - The y position of the progress bar completed - The amount completed on a scale of 0 - 100.
|
overridevirtual |
The render method of a component.
During the render phase of the program, this function is what draws the component to the screen. This should be overridden for any UIComponents and actually be used to draw to the screen using one of the many SDL_Render functions available.
Implements dengine_UI::UIComponent.
Referenced by SetFillColor().
|
inline |
Sets the filled progress of the progress bar.
completeAmount | Number between 0 and 100 |
|
inline |
Sets the fill color of the progress bar.
color | Fill color |
|
inline |
Initializes required parameters.
initPos | The X,Y coordinates of the bar on the screen |
initAmount | The initial value of the progress bar (0) |
|
overridevirtual |
The update method of a component.
During the update phase of the program, this function is what updates and performs any logic within the component. This should be overridden for any UIComponents and actually be used to Update the internal logic of the component. This is called prior to the update anywhere else within the engine.
Implements dengine_UI::UIComponent.
Referenced by SetFillColor().
|
private |
Referenced by SetCompleted(), and Setup().
|
private |
Referenced by SetFillColor().
|
private |
Referenced by Setup().