1#ifndef LIBWIIGUI_ELEMENT_H
2#define LIBWIIGUI_ELEMENT_H
172 virtual void SetState(STATE s,
int c = -1);
Primary GUI class. Most other classes inherit from this class.
Definition: gui_element.h:7
int GetAlpha()
Definition: gui_element.cpp:208
f32 xscale
Element X scale (1 = 100%)
Definition: gui_element.h:208
int GetMinX()
Definition: gui_element.cpp:141
void SetMinX(int x)
Definition: gui_element.cpp:136
int GetTop()
Definition: gui_element.cpp:105
void SetParent(GuiElement *e)
Definition: gui_element.cpp:64
bool IsClickable()
Definition: gui_element.cpp:328
int effectTarget
Effect target amount. Used by different effects for different purposes.
Definition: gui_element.h:213
void SetEffect(int e, int a, int t=0)
Definition: gui_element.cpp:393
void SetScaleY(float s)
Definition: gui_element.cpp:232
void SetRumble(bool r)
Definition: gui_element.cpp:383
bool IsVisible()
Definition: gui_element.cpp:193
int ymax
Element's max Y offset allowed.
Definition: gui_element.h:201
int alphaDyn
Element alpha, dynamic (multiplied by alpha value for blending/fading effects)
Definition: gui_element.h:207
virtual int GetSelected()
Definition: gui_element.cpp:565
int xmax
Element's max X offset allowed.
Definition: gui_element.h:203
bool IsSelectable()
Definition: gui_element.cpp:320
int GetMinY()
Definition: gui_element.cpp:161
int GetWidth()
Definition: gui_element.cpp:176
void SetMinY(int y)
Definition: gui_element.cpp:156
void SetScaleX(float s)
Definition: gui_element.cpp:227
int xmin
Element's min X offset allowed.
Definition: gui_element.h:202
float GetScaleY()
Definition: gui_element.cpp:270
int effectAmount
Effect amount. Used by different effects for different purposes.
Definition: gui_element.h:212
int ymin
Element's min Y offset allowed.
Definition: gui_element.h:200
int alpha
Element alpha value (0-255)
Definition: gui_element.h:206
int GetMaxY()
Definition: gui_element.cpp:171
GuiElement * GetParent()
Definition: gui_element.cpp:69
bool selectable
Whether or not this element selectable (can change to SELECTED state)
Definition: gui_element.h:221
int yoffsetDyn
Element Y offset, dynamic (added to yoffset value for animation effects)
Definition: gui_element.h:205
int stateChan
Which controller channel is responsible for the last change in state.
Definition: gui_element.h:220
virtual void Draw()=0
Called constantly to redraw the element.
void SetPosition(int x, int y)
Definition: gui_element.cpp:553
int effectAmountOver
EffectAmount to set when wiimote cursor is over this element.
Definition: gui_element.h:215
int width
Element width.
Definition: gui_element.h:196
ALIGN_H alignmentHor
Horizontal element alignment, respective to parent element (LEFT, RIGHT, CENTRE)
Definition: gui_element.h:217
virtual void SetState(STATE s, int c=-1)
Definition: gui_element.cpp:290
f32 scaleDyn
Element scale, dynamic (multiplied by alpha value for blending/fading effects)
Definition: gui_element.h:210
int effectsOver
Effects to enable when wiimote cursor is over this element. Copied to effects variable on over event.
Definition: gui_element.h:214
UpdateCallback updateCB
Callback function to call when this element is updated.
Definition: gui_element.h:193
int effects
Currently enabled effect(s). 0 when no effects are enabled.
Definition: gui_element.h:211
int height
Element height.
Definition: gui_element.h:197
bool holdable
Whether or not this element is holdable (can change to HELD state)
Definition: gui_element.h:223
float GetScale()
Definition: gui_element.cpp:250
bool clickable
Whether or not this element is clickable (can change to CLICKED state)
Definition: gui_element.h:222
virtual void SetVisible(bool v)
Definition: gui_element.cpp:198
GuiElement * parentElement
Parent element.
Definition: gui_element.h:194
void SetUpdateCallback(UpdateCallback u)
Definition: gui_element.cpp:548
virtual void Update(GuiTrigger *t)
Definition: gui_element.cpp:540
bool Rumble()
Definition: gui_element.cpp:378
virtual void DrawTooltip()
Called constantly to redraw the element's tooltip.
Definition: gui_element.cpp:574
void SetHoldable(bool h)
Definition: gui_element.cpp:315
virtual void ResetText()
Called when the language has changed, to obtain new text values for all text elements.
Definition: gui_element.cpp:570
virtual void SetFocus(int f)
Definition: gui_element.cpp:346
bool IsHoldable()
Definition: gui_element.cpp:338
GuiTrigger * trigger[MAX_TRIGGERS]
GuiTriggers (input actions) that this element responds to.
Definition: gui_element.h:192
virtual void SetAlignment(ALIGN_H hor, ALIGN_V vert)
Definition: gui_element.cpp:559
void UpdateEffects()
Definition: gui_element.cpp:432
bool rumble
Wiimote rumble (on/off) - set to on when this element requests a rumble event.
Definition: gui_element.h:225
GuiElement()
Constructor.
Definition: gui_element.cpp:16
bool visible
Visibility of the element. If false, Draw() is skipped.
Definition: gui_element.h:224
int IsFocused()
Definition: gui_element.cpp:351
void SetEffectOnOver(int e, int a, int t=0)
Definition: gui_element.cpp:420
float GetScaleX()
Definition: gui_element.cpp:260
int GetStateChan()
Definition: gui_element.cpp:285
void SetEffectGrow()
Shortcut to SetEffectOnOver(EFFECT_SCALE, 4, 110)
Definition: gui_element.cpp:427
virtual void ResetState()
Resets the element's state to STATE::DEFAULT.
Definition: gui_element.cpp:296
ALIGN_V alignmentVert
Horizontal element alignment, respective to parent element (TOP, BOTTOM, MIDDLE)
Definition: gui_element.h:218
void SetSize(int w, int h)
Definition: gui_element.cpp:186
void SetTrigger(GuiTrigger *t)
Definition: gui_element.cpp:356
int focus
Element focus (-1 = focus disabled, 0 = not focused, 1 = focused)
Definition: gui_element.h:195
int GetMaxX()
Definition: gui_element.cpp:151
f32 yscale
Element Y scale (1 = 100%)
Definition: gui_element.h:209
int GetHeight()
Definition: gui_element.cpp:181
int yoffset
Element Y offset.
Definition: gui_element.h:199
int effectTargetOver
EffectTarget to set when wiimote cursor is over this element.
Definition: gui_element.h:216
STATE state
Element state (DEFAULT, SELECTED, CLICKED, DISABLED)
Definition: gui_element.h:219
int xoffsetDyn
Element X offset, dynamic (added to xoffset value for animation effects)
Definition: gui_element.h:204
void SetClickable(bool c)
Definition: gui_element.cpp:305
int GetEffect()
Definition: gui_element.cpp:388
void SetMaxY(int y)
Definition: gui_element.cpp:166
void SetScale(float s)
Definition: gui_element.cpp:221
int GetLeft()
Definition: gui_element.cpp:74
void SetMaxX(int x)
Definition: gui_element.cpp:146
void SetSelectable(bool s)
Definition: gui_element.cpp:310
bool IsInside(int x, int y)
Definition: gui_element.cpp:578
virtual ~GuiElement()
Destructor.
Definition: gui_element.cpp:60
void SetAlpha(int a)
Definition: gui_element.cpp:203
int xoffset
Element X offset.
Definition: gui_element.h:198
STATE GetState()
Definition: gui_element.cpp:280
Menu input trigger management. Determine if action is neccessary based on input data by comparing con...
Definition: gui_trigger.h:12