Initial commit
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* @file menu.h
|
||||
* @author Alexander Klein (alex@kleiax.de)
|
||||
* @brief Contains the Menu class
|
||||
* @version 0.1
|
||||
* @date 2022-01-12
|
||||
*
|
||||
* @copyright Copyright (c) 2022
|
||||
*
|
||||
*/
|
||||
#ifndef MENU_H
|
||||
#define MENU_H
|
||||
|
||||
#include <list>
|
||||
|
||||
#include "menuAction.h"
|
||||
#include "menuControl.h"
|
||||
|
||||
class MenuAction;
|
||||
|
||||
/**
|
||||
* @brief A class to build menu structers
|
||||
*/
|
||||
class Menu : public MenuControl {
|
||||
public:
|
||||
Menu();
|
||||
~Menu() override;
|
||||
|
||||
/**
|
||||
* @brief Add a menu action to the menu
|
||||
*
|
||||
* @param entry
|
||||
*/
|
||||
void addEntry(MenuAction* entry);
|
||||
bool isInSubmenu();
|
||||
|
||||
void printMenu() override;
|
||||
void update() override;
|
||||
|
||||
void down() override;
|
||||
void up() override;
|
||||
void right() override;
|
||||
void left() override;
|
||||
void yes() override;
|
||||
void no() override;
|
||||
|
||||
private:
|
||||
bool inSubmenu = false;
|
||||
|
||||
std::list<MenuAction*> entrys;
|
||||
std::list<MenuAction*>::iterator selectedEntry;
|
||||
|
||||
};
|
||||
|
||||
#endif // MENU_H
|
||||
Reference in New Issue
Block a user