Aether
SDL2 based UI Framework for NX
Menu.hpp
1 #ifndef AETHER_MENU_HPP
2 #define AETHER_MENU_HPP
3 
4 #include "Aether/base/Scrollable.hpp"
5 #include "Aether/horizon/menu/MenuOption.hpp"
6 
7 namespace Aether {
12  class Menu : public Scrollable {
13  private:
15  MenuOption * active;
16 
17  public:
27  Menu(int x, int y, int w, int h);
28 
35  void update(unsigned int dt);
36 
43  void setActiveOption(MenuOption * o);
44  };
45 };
46 
47 #endif
A scrollable element arranges all of it's children as a list. It's children are rendered and 'cut off...
Definition: Scrollable.hpp:13
Menu(int x, int y, int w, int h)
Construct a new Menu object. Hides scrollbar + adjusts scroll 'catchup'.
int w()
Returns width of element.
int x()
Returns x-coordinate of element.
int h()
Returns height of element.
Base namespace for all Aether related classes and functions.
void update(unsigned int dt)
Updates menu. Keeps the selected item centred.
void setActiveOption(MenuOption *o)
Set the given option as the highlighted option. Unsets previously highlighted.
A MenuOption is a combination of elements which looks like and functions similar to Horizon's...
Definition: MenuOption.hpp:13
A menu is simply a scrollable object that sets some values on creation in order to appear like Horizo...
Definition: Menu.hpp:12
int y()
Returns y-coordinate of element.