1 #ifndef AETHER_SCREEN_HPP 2 #define AETHER_SCREEN_HPP 4 #include "Aether/base/Container.hpp" 5 #include <unordered_map> 15 std::unordered_map<Button, std::function<void()> > onButtonPressFuncs;
18 std::unordered_map<Button, std::function<void()> > onButtonReleaseFuncs;
void onButtonRelease(Button btn, std::function< void()> func)
Assigns a function to invoke when a button is released.
A container is an element that contains other elements. It implements the required behaviour to navig...
Definition: Container.hpp:16
A class that represents a screen layout Stores all screen elements for a specific screen...
Definition: Screen.hpp:12
void onButtonPress(Button btn, std::function< void()> func)
Assigns a function to invoke when a button is pressed.
virtual void onUnload()
Invoked once when the screen has been replaced by another screen. This method should tidy up all chil...
Base namespace for all Aether related classes and functions.
bool handleEvent(InputEvent *event)
Attempts to handle the event if it is a button press/release.
Screen()
Constructs a new (empty) Screen object.
Button
Enum class for buttons Avoids confusion with SDL/libnx names.
Definition: Types.hpp:12
virtual void onLoad()
Invoked once when the screen is requested to be 'shown'. This method should set up all child elements...