FillBar Class Reference
#include <FillBar.h>
Description
Simple visual Entity representing a fraction of something.
In situations where you need a visual to show a bar, like a loading progress bar , or a health bar, this is a viable option.
Public Types | |
enum | FillDirection { Up, Left, Down, Right } |
enum | FillTransition { Instant, EaseSlow, EaseFast, LinearSlow, LinearFast } |
![]() | |
enum | UpdateClass { Before, After } |
Functions | |
void | SetDims (int w, int h) |
void | SetBorder (int px) |
void | SetFillDirection (FillDirection f) |
void | SetFillTransition (FillTransition f) |
void | SetColorFill (const Color &c) |
void | SetColorEmpty (const Color &c) |
void | SetColorBorder (const Color &c) |
void | SetFill (float f) |
![]() | |
const std::vector< Entity::ID > & | GetChildren () const |
std::vector< Entity::ID > | GetAllSubEntities () const |
bool | Contains (Entity::ID) |
std::vector< Entity::ID > | FindChildByName (const std::string &) |
void | Step () |
void | Draw () |
void | Attach (Entity::ID) |
void | Detach (Entity::ID) |
template<typename T > | |
T * | CreateChild () |
int | GetNumChildren () |
double | StepDuration () |
double | DrawDuration () |
void | SetPriority (Priority p) |
void | SetPriorityLast () |
void | SetPriorityFirst () |
Priority | GetPriority () |
Entity & | GetParent () |
bool | HasParent () |
void | Remove () |
void | SetName (const std::string &name) |
ID | GetID () |
std::string | GetName () |
void | Watch (Variable v) |
Variable | GetWatched (const std::string &name) |
std::vector< Variable > | GetWatchedVars () |
void | Unwatch (const std::string &varName) |
template<typename T > | |
T * | AddComponent (UpdateClass when=UpdateClass::Before) |
template<typename T > | |
T * | QueryComponent () |
const std::vector< Component * > & | GetComponents () const |
void | RemoveComponent (const std::string &tag) |
void | RemoveComponent (const Component *) |
bool | IsStepping () |
bool | IsDrawing () |
Additional Inherited Members | |
![]() | |
template<typename T > | |
static Entity::ID | Create () |
static Entity::ID | Create () |
template<typename T > | |
static T * | CreateReference () |
static std::vector< Entity::ID > | GetAll () |
![]() | |
bool | step |
bool | draw |
![]() | |
virtual void | OnEnter () |
virtual void | OnDepart () |
virtual void | OnRemove () |
virtual void | OnPreStep () |
virtual void | OnStep () |
virtual void | OnPreDraw () |
virtual void | OnDraw () |
Member Enumeration Documentation
|
strong |
|
strong |
Sets how the bar will show the fraction of fill when it changes.
Member Function Documentation
void SetDims | ( | int | w, |
int | h | ||
) |
Sets the dimensions of the bar.
void SetBorder | ( | int | px | ) |
Sets the number of pixels to make the border.
void SetFillDirection | ( | FillDirection | f | ) |
Sets the fill direction.
void SetFillTransition | ( | FillTransition | f | ) |
Sets the fill transition.
void SetColorFill | ( | const Color & | c | ) |
Sets the color of the filling visual.
void SetColorEmpty | ( | const Color & | c | ) |
Sets the background color for the empty portion of the bar.
void SetColorBorder | ( | const Color & | c | ) |
Sets the color of the fill border.
void SetFill | ( | float | f | ) |
Sets the fill fraction amount.
Should be a fraction from 0.f to 1.f. If the amount is outside these ranges , the value is clamped.
The documentation for this class was generated from the following file:
- /home/jc/git/Dynacoe/DynacoeSrc/includes/Dynacoe/BuiltIn/FillBar.h