Aether
SDL2 based UI Framework for NX
include
Aether
horizon
overlays
PopupList.hpp
1
#ifndef AETHER_POPUPLIST_HPP
2
#define AETHER_POPUPLIST_HPP
3
4
#include "Aether/Overlay.hpp"
5
#include "Aether/horizon/controls/ControlBar.hpp"
6
#include "Aether/horizon/list/List.hpp"
7
#include "Aether/horizon/list/ListButton.hpp"
8
#include "Aether/primary/Rectangle.hpp"
9
10
namespace
Aether
{
16
class
PopupList
:
public
Overlay
{
17
private
:
19
ControlBar
* ctrl;
21
List
* list;
23
Rectangle
* rect;
25
Rectangle
* top;
27
Rectangle
* bottom;
29
Text
* title;
31
std::vector<ListButton *> items;
33
Colour
hiColour;
35
Colour
llColour;
37
Colour
txColour;
38
39
public
:
45
PopupList
(std::string s);
46
54
void
addEntry
(std::string s, std::function<
void
()> f,
bool
t =
false
);
55
61
void
setTitleLabel
(std::string s);
62
68
void
setBackLabel
(std::string s);
69
75
void
setOKLabel
(std::string s);
76
80
void
removeEntries
();
81
87
Colour
getBackgroundColour
();
88
94
void
setBackgroundColour
(
Colour
c);
95
101
Colour
getTextColour
();
102
108
void
setTextColour
(
Colour
c);
109
115
Colour
getLineColour
();
116
122
void
setLineColour
(
Colour
c);
123
129
Colour
getHighlightColour
();
130
136
void
setHighlightColour
(
Colour
c);
137
143
Colour
getListLineColour
();
144
150
void
setListLineColour
(
Colour
c);
151
161
void
setAllColours
(
Colour
bg,
Colour
hi,
Colour
li,
Colour
lli,
Colour
tx);
162
};
163
};
164
165
#endif
Aether::PopupList::setLineColour
void setLineColour(Colour c)
Set the line colour.
Aether::Rectangle
A rectangle is a texture containing either a normal or rounded rectangle.
Definition:
Rectangle.hpp:11
Aether::PopupList::setAllColours
void setAllColours(Colour bg, Colour hi, Colour li, Colour lli, Colour tx)
Set the all colours.
Aether::List
A list is a scrollable with some values changed to match how a list functions within Horizon...
Definition:
List.hpp:11
Aether::Text
Element for rendering a single line of text. It can optionally scroll when overflowing.
Definition:
Text.hpp:15
Aether::PopupList::PopupList
PopupList(std::string s)
Construct a new Popup List object.
Aether::PopupList::getBackgroundColour
Colour getBackgroundColour()
Get the background colour.
Aether::PopupList::setTitleLabel
void setTitleLabel(std::string s)
Set the title label.
Aether::PopupList::addEntry
void addEntry(std::string s, std::function< void()> f, bool t=false)
Add new entry to popup list.
Aether::PopupList::setBackgroundColour
void setBackgroundColour(Colour c)
Set the background colour.
Aether::PopupList::setBackLabel
void setBackLabel(std::string s)
Set the back button label.
Aether::Colour
Stores RGBA values representing a colour. Each component can be within the range 0 to 255 (inclusive)...
Definition:
Colour.hpp:9
Aether::PopupList::setListLineColour
void setListLineColour(Colour c)
Set the list line colour.
Aether
Base namespace for all Aether related classes and functions.
Aether::PopupList::removeEntries
void removeEntries()
Removes all entries from list.
Aether::ControlBar
A container holding control elements (and nothing else) which automatically arranges them at the bott...
Definition:
ControlBar.hpp:16
Aether::PopupList::getLineColour
Colour getLineColour()
Get the line colour.
Aether::PopupList::setOKLabel
void setOKLabel(std::string s)
Set the OK button label.
Aether::PopupList::setHighlightColour
void setHighlightColour(Colour c)
Set the highlight colour.
Aether::PopupList
A "PopupList" is an overlay at the bottom of the screen containing a list of items to select from...
Definition:
PopupList.hpp:16
Aether::Overlay
An object representing an overlay.
Definition:
Overlay.hpp:14
Aether::PopupList::getListLineColour
Colour getListLineColour()
Get the list line colour.
Aether::PopupList::setTextColour
void setTextColour(Colour c)
Set the text colour.
Aether::PopupList::getTextColour
Colour getTextColour()
Get the text colour.
Aether::PopupList::getHighlightColour
Colour getHighlightColour()
Get the highlight colour.
Generated by
1.8.13