Aether
SDL2 based UI Framework for NX
include
Aether
horizon
menu
MenuOption.hpp
1
#ifndef AETHER_MENUOPTION_HPP
2
#define AETHER_MENUOPTION_HPP
3
4
#include "Aether/base/Element.hpp"
5
#include "Aether/primary/Rectangle.hpp"
6
#include "Aether/primary/Text.hpp"
7
8
namespace
Aether
{
13
class
MenuOption
:
public
Element
{
14
private
:
16
bool
active;
18
Colour
activeColour;
20
Colour
inactiveColour;
22
Rectangle
* rect;
24
Text
* text;
25
26
public
:
35
MenuOption
(std::string s,
Colour
a,
Colour
ia, std::function<
void
()> f);
36
42
void
setW
(
int
w
);
43
49
void
setActive
(
bool
b);
50
56
void
setActiveColour
(
Colour
c);
57
63
void
setInactiveColour
(
Colour
c);
64
};
65
};
66
67
#endif
Aether::Rectangle
A rectangle is a texture containing either a normal or rounded rectangle.
Definition:
Rectangle.hpp:11
Aether::MenuOption::MenuOption
MenuOption(std::string s, Colour a, Colour ia, std::function< void()> f)
Construct a new Menu Option object.
Aether::MenuOption::setInactiveColour
void setInactiveColour(Colour c)
Set the inactive colour for option.
Aether::MenuOption::setW
void setW(int w)
Updates width for menu option Setting new width also adjusts the width of text texture if necessary...
Aether::Text
Element for rendering a single line of text. It can optionally scroll when overflowing.
Definition:
Text.hpp:15
Aether::MenuOption::setActiveColour
void setActiveColour(Colour c)
Set the active colour for option.
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
Base namespace for all Aether related classes and functions.
Aether::Element::setActive
virtual void setActive()
Set element as activated.
Aether::MenuOption
A MenuOption is a combination of elements which looks like and functions similar to Horizon's...
Definition:
MenuOption.hpp:13
Generated by
1.8.13