|
| Spinner (int x, int y, int w=90) |
| Construct a new Spinner object. Value is initialized to 0. More...
|
|
bool | handleEvent (InputEvent *e) |
| Attempt to handle given event. More...
|
|
void | update (unsigned int dt) |
| Updates spinner container. Updates textures and values as necessary. More...
|
|
void | setActive () |
| Set the spinner as active (focused)
|
|
void | setInactive () |
| Set the spinner as inactive (un-focused)
|
|
bool | wrapAround () |
| Get whether to wrap around value if is overflowed/underflowed. More...
|
|
void | setWrapAround (bool b) |
| Set whether to wrap around value if is overflowed/underflowed. More...
|
|
unsigned int | digits () |
| Get current value padding (number of zeros to pad value with) More...
|
|
void | setDigits (unsigned int p) |
| Set current value padding (number of zeros to pad value with) More...
|
|
void | setLabel (std::string s) |
| Set the current label string. More...
|
|
std::string | label () |
| Get the current label string. More...
|
|
int | changeAmount () |
| Get the step size to change value by. More...
|
|
void | setChangeAmount (int a) |
| Set the step size to change value by. More...
|
|
int | value () |
| Get the spinner value. More...
|
|
void | setValue (int v) |
| Set the spinner value. More...
|
|
int | min () |
| Get the minimum value. More...
|
|
void | setMin (int m) |
| Set the minimum value. More...
|
|
int | max () |
| Get the maximum value. More...
|
|
void | setMax (int m) |
| Set the maximum value. More...
|
|
Colour | getArrowColour () |
| Get the arrow colour. More...
|
|
void | setArrowColour (Colour c) |
| Set the arrow colour. More...
|
|
Colour | getHighlightColour () |
| Get the highlight colour. More...
|
|
void | setHighlightColour (Colour c) |
| Set the highlight colour. More...
|
|
Colour | getTextColour () |
| Get the text colour. More...
|
|
void | setTextColour (Colour c) |
| Set the text colour. More...
|
|
| Container (int x=0, int y=0, int w=100, int h=100) |
| Construct a new Container object. More...
|
|
void | addElement (Element *e) |
| Adds new element a child. More...
|
|
bool | removeElement (Element *e) |
| Attempt to delete given child element. More...
|
|
void | removeAllElements () |
| Deletes all children elements.
|
|
bool | returnElement (Element *e) |
| Attempt to remove the given child element. More...
|
|
void | returnAllElements () |
| Removes (but does not delete) all children elements.
|
|
| Element (int x=0, int y=0, int w=100, int h=100) |
| Construct a new Element object. More...
|
|
int | x () |
| Returns x-coordinate of element. More...
|
|
int | y () |
| Returns y-coordinate of element. More...
|
|
int | w () |
| Returns width of element. More...
|
|
int | h () |
| Returns height of element. More...
|
|
virtual void | setX (int x) |
| Set x-coordinate of element. More...
|
|
virtual void | setY (int y) |
| Set y-coordinate of element. More...
|
|
virtual void | setW (int w) |
| Set width of element. More...
|
|
virtual void | setH (int h) |
| Set height of element. More...
|
|
virtual void | setXY (int x, int y) |
| Set co-ordinates of element. More...
|
|
virtual void | setWH (int w, int h) |
| Set size of element. More...
|
|
virtual void | setXYWH (int x, int y, int w, int h) |
| Setter size and co-ordinates of element. More...
|
|
Element * | parent () |
| Returns the parent element of this element. More...
|
|
void | setParent (Element *p) |
| Set the parent element of this element. More...
|
|
bool | isVisible () |
| Check if current element is visible on-screen. More...
|
|
bool | hidden () |
| Check if current element is hidden. More...
|
|
void | setHidden (bool b) |
| Set whether element is hidden or not. More...
|
|
bool | selected () |
| Check if current element is selected. More...
|
|
virtual void | setSelected (bool b) |
| Set whether element is selected or not. More...
|
|
bool | selectable () |
| Check if current element is selectable. More...
|
|
void | setSelectable (bool b) |
| Set whether element is selectable or not. More...
|
|
bool | touchable () |
| Check if current element is touch responsive. More...
|
|
void | setTouchable (bool b) |
| Set whether element is touch responsive or not. More...
|
|
bool | highlighted () |
| Check if current element is highlighted. More...
|
|
void | setHighlighted (bool b) |
| Set whether element is highlighted or not. More...
|
|
bool | hasHighlighted () |
| Check if current element has highlighted children element. More...
|
|
void | setHasHighlighted (bool b) |
| Set whether element has highlighted children element or not. More...
|
|
bool | hasSelectable () |
| Check if current element has selectable children element. More...
|
|
void | setHasSelectable (bool b) |
| Set whether element has selectable children element or not. More...
|
|
bool | hasSelected () |
| Check if current element has selected children element. More...
|
|
void | setHasSelected (bool b) |
| Set whether element has selected children element or not. More...
|
|
void | setFocused (Element *e) |
| Sets current element as unfocused and instead focuses a sub-element. More...
|
|
void | setFocussed (Element *e) |
| Sets current element as unfocused and instead focuses a sub-element. More...
|
|
Element * | focused () |
| Returns the currently focused element. More...
|
|
Element * | focussed () |
| Returns the currently focused element. More...
|
|
std::function< void()> | onPressFunc () |
| Returns function invoked when the element is pressed. More...
|
|
void | onPress (std::function< void()> f) |
| Sets the function to invoked when the element is pressed. More...
|
|
virtual void | render () |
| Render child elements + highlights.
|
|
virtual Drawable * | renderHighlightBG () |
| Renders the highlight background. More...
|
|
virtual Drawable * | renderHighlight () |
| Renders the highlight border. More...
|
|
virtual Drawable * | renderSelection () |
| Renders the selection overlay. More...
|
|
virtual | ~Element () |
| Destroy the Element object.
|
|
A Spinner contains a number which can be increased/decreased by pressing the associated up/down buttons or the dpad.
- Note
- This element has a default height and should not be changed!