1 #ifndef AETHER_LISTOPTION_HPP 2 #define AETHER_LISTOPTION_HPP 4 #include "Aether/primary/Rectangle.hpp" 5 #include "Aether/primary/Text.hpp" 27 void positionElements();
37 ListOption(std::string t, std::string v, std::function<
void()> f);
ListOption(std::string t, std::string v, std::function< void()> f)
Construct a new List Option object.
A rectangle is a texture containing either a normal or rounded rectangle.
Definition: Rectangle.hpp:11
std::string value()
Get the value string.
void setLineColour(Colour c)
Set the line colour (top rectangle colour)
void setW(int w)
Set the width of the list option All elements are repositioned when this is called.
Element for rendering a single line of text. It can optionally scroll when overflowing.
Definition: Text.hpp:15
void setValueColour(Colour c)
Set the value colour.
void setH(int h)
Set the height of the list option All elements are repositioned when this is called.
Colour getValueColour()
Get the value colour.
std::string hint()
Get the hint string.
int w()
Returns width of element.
void setValue(std::string s)
Set the value string.
Stores RGBA values representing a colour. Each component can be within the range 0 to 255 (inclusive)...
Definition: Colour.hpp:9
Colour getLineColour()
Get the line colour (top rectangle colour)
Element is the base class to be inherited to form all other types of elements.
Definition: Element.hpp:18
int h()
Returns height of element.
Base namespace for all Aether related classes and functions.
void setFontSize(unsigned int s)
Set the font size. Also repositions centers.
void setHint(std::string s)
Set the hint string.
void setHintColour(Colour c)
Set the hint colour.
Colour getHintColour()
Get the hint colour.
void setColours(Colour l, Colour h, Colour v)
Set all colours at once: line, hint, value.
unsigned int fontSize()
Get the font size.
A ListOption is similar to what appears in Horizon's lists. It has a string and value, as well as a function which is called when selected.
Definition: ListOption.hpp:13