Projeto IDJ - Towers Of Madness
TowerDefenseLovecraftnianoZombicida
 Todos Classes Arquivos Funções Variáveis Definições de Tipos Enumerações Valores enumerados Definições e Macros Páginas
Métodos Públicos | Métodos Protegidos | Atributos Privados | Lista de todos os Membros
Referência da Classe UIimageButton

#include <UIimageButton.h>

Diagrama de Hierarquia para UIimageButton:
[legenda]
Diagrama de colaboração para UIimageButton:
[legenda]

Métodos Públicos

 UIimageButton (UIbutton::State initialState=UIbutton::State::ENABLED, UIelement::BehaviorType behavior=UIelement::BehaviorType::FIT)
 
virtual ~UIimageButton ()
 
void Update (float dt, Rect parentCanvas)
 
void SetUIbuttonState (UIbutton::State newState)
 Solicita ao botão que transite para outro estado. Mais...
 
void SetStateSprite (UIbutton::State state, Sprite *sprite)
 
const SpriteGetStateSprite (UIbutton::State state) const
 
float GetStateSpriteWidth (UIbutton::State state) const
 
float GetStateSpriteHeight (UIbutton::State state) const
 
Vec2 GetStateSpriteDimensions (UIbutton::State state) const
 
void SetStateSpriteScale (UIbutton::State state, float scale)
 
void SetStateSpriteColorMultiplier (UIbutton::State state, Color scale, SDL_BlendMode blendMode=ALPHA_BLEND)
 
bool Is (std::string UItype) const
 Checa qual o tipo do objeto. Mais...
 
- Métodos Públicos inherited from UIimage
 UIimage (std::string file, UIelement::BehaviorType behavior=UIelement::BehaviorType::STRETCH)
 
virtual ~UIimage ()
 
virtual void Render (bool debugRender=false) const
 
float GetSpriteWidth (void)
 
float GetSpriteHeight (void)
 
Vec2 GetSpriteDimensions (void)
 
void SetSpriteScale (float scale)
 
void SetSpriteColorMultiplier (Color scale, SDL_BlendMode blendMode=ALPHA_BLEND)
 
- Métodos Públicos inherited from UIelement
void SetCenter (Vec2 center)
 
void SetAnchors (Vec2 min, Vec2 max)
 
void SetOffsets (Vec2 min, Vec2 max)
 
void SetBehavior (BehaviorType type)
 
Rect GetAnchors (void) const
 
Rect GetOffsets (void) const
 
Rect GetBoundingBox (void) const
 
Rect ComputeBoundingbox (Rect parentCanvas)
 
Rect ComputeBox (Rect boundingBox={-1.,-1.,-1.,-1.})
 
 operator Rect () const
 
- Métodos Públicos inherited from UIbutton
void SetCallback (UIbutton::State stateToSet, void *caller, ButtonCallback callback)
 Seta o callback a ser chamado para cada estado. Mais...
 
void SetClickCallback (void *caller, ButtonCallback callback)
 Seta o callback a ser chamado ao clicar no botão. Mais...
 
UIbutton::State GetUIbuttonState (void) const
 Retorna o estado atual do botão. Mais...
 
void Click ()
 Realiza o processo interno de clique. Mais...
 

Métodos Protegidos

void UpdateKernel (void)
 
- Métodos Protegidos inherited from UIimage
 UIimage (UIelement::BehaviorType behavior=UIelement::BehaviorType::STRETCH)
 
- Métodos Protegidos inherited from UIelement
 UIelement (BehaviorType behavior=BehaviorType::STRETCH, Vec2 center=Vec2(0.5, 0.5))
 
- Métodos Protegidos inherited from UIbutton
 UIbutton (UIbutton::State initialState=UIbutton::State::ENABLED, bool interactOnBoundingBox=true)
 Construtor protegido para não permitir que seja diretamente instanciado. Mais...
 
void Update (float dt, bool mouseIsInside)
 

Atributos Privados

SpritedisabledSprite
 
SpriteenabledSprite
 
SpritehighlightedSprite
 
SpritepressedSprite
 

Additional Inherited Members

- Tipos Públicos inherited from UIelement
enum  BehaviorType { FIT, FILL, STRETCH }
 
- Tipos Públicos inherited from UIbutton
enum  State : int { DISABLED = 0, ENABLED, HIGHLIGHTED, PRESSED }
 Possíveis estados que um botão pode assumir. Mais...
 
typedef void(* ButtonCallback )(void *)
 
- Atributos Públicos inherited from UIimage
float angle
 
- Atributos Públicos inherited from UIbutton
bool interactOnBoundingBox
 
- Atributos Protegidos inherited from UIimage
Spritesp
 
- Atributos Protegidos inherited from UIelement
Rect boundingBox
 
Rect box
 
Vec2 kernelSize
 
Vec2 center
 
- Atributos Protegidos inherited from UIbutton
UIbutton::State actualState
 
ButtonCallback disabledCallback
 
ButtonCallback enabledCallback
 
ButtonCallback highlightedCallback
 
ButtonCallback pressedCallback
 
ButtonCallback clickedCallback
 
void * disableCaller
 
void * enabledCaller
 
void * highlightedCaller
 
void * pressedCaller
 
void * clickCaller
 

Construtores & Destrutores

UIimageButton::UIimageButton ( UIbutton::State  initialState = UIbutton::State::ENABLED,
UIelement::BehaviorType  behavior = UIelement::BehaviorType::FIT 
)
UIimageButton::~UIimageButton ( )
virtual

Métodos

const Sprite & UIimageButton::GetStateSprite ( UIbutton::State  state) const
Vec2 UIimageButton::GetStateSpriteDimensions ( UIbutton::State  state) const
float UIimageButton::GetStateSpriteHeight ( UIbutton::State  state) const
float UIimageButton::GetStateSpriteWidth ( UIbutton::State  state) const
bool UIimageButton::Is ( std::string  UItype) const
virtual

Checa qual o tipo do objeto.

Retorna
True caso a string seja o nome dessa classe ou de qualquer uma que ela herde.

Reimplementação de UIbutton.

void UIimageButton::SetStateSprite ( UIbutton::State  state,
Sprite sprite 
)
void UIimageButton::SetStateSpriteColorMultiplier ( UIbutton::State  state,
Color  scale,
SDL_BlendMode  blendMode = ALPHA_BLEND 
)
void UIimageButton::SetStateSpriteScale ( UIbutton::State  state,
float  scale 
)
void UIimageButton::SetUIbuttonState ( UIbutton::State  newState)
virtual

Solicita ao botão que transite para outro estado.

Parâmetros
newStateUma enumeração que indica qual é o novo estado desejado para o botão

Realiza todo o processamento interno para a transição de estados e, por último, chama o callback do novo estado.

Reimplementação de UIbutton.

void UIimageButton::Update ( float  dt,
Rect  parentCanvas 
)
virtual

Reimplementação de UIelement.

void UIimageButton::UpdateKernel ( void  )
protected

Atributos

Sprite* UIimageButton::disabledSprite
private
Sprite* UIimageButton::enabledSprite
private
Sprite* UIimageButton::highlightedSprite
private
Sprite* UIimageButton::pressedSprite
private

A documentação para esta classe foi gerada a partir dos seguintes arquivos: