This class display the menu page of this game. More...
#include <Menu.h>
Public Member Functions | |
Menu ()=default | |
Default constructor. More... | |
void | Render (SDL_Renderer *ren) override |
Render the menu page to the active viewport. More... | |
void | processInput (SDL_Event e) override |
Process user input. More... | |
void | Update (int x, int y, int *params) override |
Update the position of arrows in the menu page. More... | |
void | setMenuOption (MENU_OPTION newOp) |
set the menu option More... | |
MENU_OPTION | getMenuOption () |
get the menu option More... | |
Public Member Functions inherited from GameObject | |
GameObject () | |
Constructor. More... | |
~GameObject () | |
Destructor. More... | |
void | removeComponent (std::string key) |
Remove a component in this gameobject. More... | |
void | addComponent (std::string key, Component *component) |
Add a component in this gameobject. More... | |
Component * | getComponent (std::string key) |
Get an reference of a component. More... | |
void | setActive (bool newState) |
activate / deactivate game object. inactive object won't be updated and rendered More... | |
bool | isActive () |
Get the state of the game. More... | |
int | getID () |
Get the unique id of the gameobject. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from GameObject | |
static int | idCounter = 0 |
Protected Attributes inherited from GameObject | |
std::map< std::string, Component * > | m_components |
Store all the game components in a map. More... | |
bool | objState |
deactivated objects won't get updated/rendered More... | |
int | id |
the unique id More... | |
This class display the menu page of this game.
|
default |
Default constructor.
|
inline |
get the menu option
|
overridevirtual |
Process user input.
e | A SDL_Event that contains structures for the different event types. |
Reimplemented from GameObject.
|
overridevirtual |
Render the menu page to the active viewport.
ren | Reference to SDL renderer. |
Reimplemented from GameObject.
|
inline |
set the menu option
|
overridevirtual |
Update the position of arrows in the menu page.
x | The x location of something. |
y | The x location of something. |
params | An int array stores additional data. |
Reimplemented from GameObject.