|
Projeto IDJ - Towers Of Madness
TowerDefenseLovecraftnianoZombicida
|
#include <UItextButton.h>
Métodos Públicos | |
| UItextButton (string fontFile, int fontSize, UItext::TextStyle style, SDL_Color color, string text, UIbutton::State startingState=UIbutton::State::ENABLED, UIelement::BehaviorType behavior=UIelement::BehaviorType::FIT, bool isStrobing=false) | |
| void | Update (float dt, Rect parentCanvas) |
| Update. Mais... | |
| void | ConfigColors (SDL_Color disabled, SDL_Color enabled, SDL_Color highlighted, SDL_Color pressed) |
| void | SetUIbuttonState (UIbutton::State newState) |
| Solicita ao botão que transite para outro estado. Mais... | |
| void | SetStateColor (UIbutton::State state, SDL_Color color) |
| SDL_Color | GetStateColor (UIbutton::State state) const |
| bool | Is (std::string UItype) const |
| Checa qual o tipo do objeto. Mais... | |
Métodos Públicos inherited from UItext | |
| UItext (string fontFile, int fontSize, TextStyle style, SDL_Color color, string text, UIelement::BehaviorType behavior=UIelement::BehaviorType::FIT, bool isStrobing=false) | |
| Construtor. Mais... | |
| virtual | ~UItext () |
| Destrutor. Mais... | |
| virtual void | Render (bool debugRender=false) const |
| Renderiza Texto. Mais... | |
| void | SetText (string text) |
| Altera o texto. Mais... | |
| void | SetColor (SDL_Color color) |
| Altera a cor. Mais... | |
| void | SetStyle (TextStyle style) |
| Altera o estilo. Mais... | |
| void | SetFontSize (int fontSize) |
| Altera o tamanho da fonte. Mais... | |
| Vec2 | GetSize (void) const |
| Obtém o tamanho do texto. Mais... | |
| void | SetTimeShown (float newTime) |
| Altera tempo mostrado enquanto pisca. Mais... | |
| void | SetStrobeFrequency (float fullTime) |
| Altera tempo de piscagem. Mais... | |
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... | |
Atributos Privados | |
| SDL_Color | disabledColor |
| SDL_Color | enabledColor |
| SDL_Color | highlightedColor |
| SDL_Color | pressedColor |
Additional Inherited Members | |
Tipos Públicos inherited from UItext | |
| enum | TextStyle { SOLID, SHARED, BLENDED } |
| Informa como o texto será rendeizaddo. Mais... | |
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 UIbutton | |
| bool | interactOnBoundingBox |
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 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 |
| UItextButton::UItextButton | ( | string | fontFile, |
| int | fontSize, | ||
| UItext::TextStyle | style, | ||
| SDL_Color | color, | ||
| string | text, | ||
| UIbutton::State | startingState = UIbutton::State::ENABLED, |
||
| UIelement::BehaviorType | behavior = UIelement::BehaviorType::FIT, |
||
| bool | isStrobing = false |
||
| ) |
| void UItextButton::ConfigColors | ( | SDL_Color | disabled, |
| SDL_Color | enabled, | ||
| SDL_Color | highlighted, | ||
| SDL_Color | pressed | ||
| ) |
| SDL_Color UItextButton::GetStateColor | ( | UIbutton::State | state | ) | const |
|
virtual |
Checa qual o tipo do objeto.
Reimplementação de UIbutton.
| void UItextButton::SetStateColor | ( | UIbutton::State | state, |
| SDL_Color | color | ||
| ) |
|
virtual |
Solicita ao botão que transite para outro estado.
| newState | Uma 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.
|
virtual |
|
private |
|
private |
|
private |
|
private |
1.8.8