Aether
SDL2 based UI Framework for NX
ControlItem.hpp
1 #ifndef AETHER_CONTROLS_CONTROLITEM_HPP
2 #define AETHER_CONTROLS_CONTROLITEM_HPP
3 
4 #include "Aether/primary/Text.hpp"
5 
6 namespace Aether {
11  class ControlItem : public Element {
12  private:
13  Button button_;
15  Text * icon;
16  Text * label;
18  public:
25  ControlItem(const Button btn, const std::string & label);
26 
32  Button button();
33 
39  void setColour(const Colour & colour);
40 
46  void setLabel(const std::string & label);
47  };
48 };
49 
50 #endif
ControlItem(const Button btn, const std::string &label)
Label text.
Element for rendering a single line of text. It can optionally scroll when overflowing.
Definition: Text.hpp:15
Button button()
Returns the control's associated button.
void setColour(const Colour &colour)
Set the colour to tint the element with.
void setLabel(const std::string &label)
Set the control's label.
Stores RGBA values representing a colour. Each component can be within the range 0 to 255 (inclusive)...
Definition: Colour.hpp:9
Element is the base class to be inherited to form all other types of elements.
Definition: Element.hpp:18
Base namespace for all Aether related classes and functions.
An item used by and updated by the ControlBar element. It shows a button icon and label...
Definition: ControlItem.hpp:11
Button
Enum class for buttons Avoids confusion with SDL/libnx names.
Definition: Types.hpp:12