Aether
SDL2 based UI Framework for NX
include
Aether
horizon
list
ListButton.hpp
1
#ifndef AETHER_LISTBUTTON_HPP
2
#define AETHER_LISTBUTTON_HPP
3
4
#include "Aether/primary/Rectangle.hpp"
5
#include "Aether/primary/Text.hpp"
6
7
namespace
Aether
{
12
class
ListButton
:
public
Element
{
13
private
:
15
Rectangle
* topR;
17
Rectangle
* bottomR;
19
Text
* text_;
20
21
public
:
28
ListButton
(std::string s, std::function<
void
()> f);
29
35
Colour
getLineColour
();
36
42
void
setLineColour
(
Colour
c);
43
49
Colour
getTextColour
();
50
56
void
setTextColour
(
Colour
c);
57
64
void
setColours
(
Colour
l,
Colour
t);
65
71
std::string
text
();
72
78
void
setText
(std::string s);
79
85
unsigned
int
fontSize
();
86
92
void
setFontSize
(
unsigned
int
f);
93
100
void
setW
(
int
w
);
101
108
void
setH
(
int
h
);
109
};
110
};
111
112
#endif
Aether::Rectangle
A rectangle is a texture containing either a normal or rounded rectangle.
Definition:
Rectangle.hpp:11
Aether::ListButton
A ListButton is similar to what appears in Horizon's lists. It has a string and should be used to ope...
Definition:
ListButton.hpp:12
Aether::ListButton::setColours
void setColours(Colour l, Colour t)
Set all colours at once: line, text.
Aether::Text
Element for rendering a single line of text. It can optionally scroll when overflowing.
Definition:
Text.hpp:15
Aether::ListButton::setW
void setW(int w)
Set the width of the list button Adjusting width also changes the width of rectangles.
Aether::ListButton::fontSize
unsigned int fontSize()
Get the font size.
Aether::ListButton::getTextColour
Colour getTextColour()
Get the text colour.
Aether::ListButton::setTextColour
void setTextColour(Colour c)
Set the text colour.
Aether::ListButton::getLineColour
Colour getLineColour()
Get the line colour.
Aether::ListButton::ListButton
ListButton(std::string s, std::function< void()> f)
Construct a new List Button object.
Aether::ListButton::setLineColour
void setLineColour(Colour c)
Set the line colour.
Aether::ListButton::setFontSize
void setFontSize(unsigned int f)
Set the font size.
Aether::Element::w
int w()
Returns width of element.
Aether::Colour
Stores RGBA values representing a colour. Each component can be within the range 0 to 255 (inclusive)...
Definition:
Colour.hpp:9
Aether::Element
Element is the base class to be inherited to form all other types of elements.
Definition:
Element.hpp:18
Aether::Element::h
int h()
Returns height of element.
Aether
Base namespace for all Aether related classes and functions.
Aether::ListButton::text
std::string text()
Get the list text.
Aether::ListButton::setH
void setH(int h)
Set the height of the list button Adjusting height also moves same elements.
Aether::ListButton::setText
void setText(std::string s)
Set the list text.
Generated by
1.8.13