|
StarEngine
|
#include <Button.h>


Public Types | |
| typedef std::function< void()> | ButtonAction |
Public Member Functions | |
| Button (const tstring &assetFile, const tstring &spriteName, bool isSpriteSheet=false, int Heightsegments=1, bool isHudElement=true) | |
| ~Button () | |
| void | SetOnHoverCallback (ButtonAction onHover) |
| void | SetOnClickCallback (ButtonAction onClick) |
| void | SetOnLeaveCallback (ButtonAction onLeave) |
Public Member Functions inherited from star::Object | |
| Object () | |
| virtual | ~Object (void) |
| Object * | GetParent () const |
| void | BaseInitialize () |
| void | BaseUpdate (const Context &context) |
| void | BaseDraw () |
| const tstring & | GetName () const |
| void | SetName (const tstring &name) |
| void | AddComponent (BaseComponent *pComponent) |
| void | RemoveComponent (const BaseComponent *pComponent) |
| void | AddChild (Object *pObject) |
| void | RemoveChild (const Object *pObject) |
| std::vector< Object * > & | GetChildren () |
| void | SetCollisionTag (const tstring &tag) |
| const tstring & | GetCollisionTag () const |
| void | SetVisible (bool visible) |
| bool | IsVisible () const |
| void | Freeze (bool freeze) |
| bool | IsFrozen () const |
| void | SetDisabled (bool disabled) |
| bool | IsDisabled () const |
| void | CollisionCheck (Object *otherObject) |
| bool | RectangleCollision (Object *object, Object *otherObject) |
| bool | CircleCollision (Object *object, Object *otherObject) |
| bool | RectangleCircleCollision (Object *object, Object *otherObject) |
| void | SetScene (BaseScene *pScene) |
| void | UnsetScene () |
| TransformComponent * | GetTransform () const |
| BaseScene * | GetScene () const |
| template<class T > | |
| T * | GetComponent (bool searchChildren=false) const |
| template<class T > | |
| T * | GetChild () const |
| template<class T > | |
| T * | GetChild (const tstring &name) const |
Protected Member Functions | |
| void | Initialize () |
| void | Update (const Context &context) |
| void | Draw (const Context &context) |
| void | OnClick () |
| void | OnHover () |
| void | OnLeave () |
Protected Member Functions inherited from star::Object | |
| virtual void | Draw () |
Additional Inherited Members | |
Protected Attributes inherited from star::Object | |
| bool | m_bIsInitialized |
| bool | m_IsVisible |
| bool | m_IsFrozen |
| Object * | m_pParentGameObject |
| PathFindNodeComponent * | m_pPathFindComp |
| BaseScene * | m_pScene |
| std::vector< BaseComponent * > | m_pComponents |
| std::vector< Object * > | m_pChildren |
| tstring | m_Name |
| tstring | m_CollisionTag |
| typedef std::function<void()> star::Button::ButtonAction |
| star::Button::Button | ( | const tstring & | assetFile, |
| const tstring & | spriteName, | ||
| bool | isSpriteSheet = false, |
||
| int | Heightsegments = 1, |
||
| bool | isHudElement = true |
||
| ) |
| star::Button::~Button | ( | void | ) |
|
protected |
|
protectedvirtual |
Reimplemented from star::Object.
|
protected |
|
protected |
|
protected |
| void star::Button::SetOnClickCallback | ( | ButtonAction | onClick | ) |
| void star::Button::SetOnHoverCallback | ( | ButtonAction | onHover | ) |
| void star::Button::SetOnLeaveCallback | ( | ButtonAction | onLeave | ) |
|
protectedvirtual |
Reimplemented from star::Object.
1.8.5