mit menu angefangen

This commit is contained in:
2022-01-12 18:58:52 +01:00
parent be6f20d96b
commit 4ba7995bb4
4 changed files with 152 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
/**
* @file menuEntry.cpp
* @author Alexander Klein (alex@kleiax.de)
* @brief
* @version 0.1
* @date 2022-01-12
*
* @copyright Copyright (c) 2022
*
*/
#include "menuEntry.h"
MenuEntry::MenuEntry(const char* name, void (*function) (), void (*callback) ()) {
this->name = name;
this->function = function;
this->callback = callback;
}
MenuEntry::MenuEntry(const char* name, void (*function) ()) {
this->name = name;
this->function = function;
}
MenuEntry::MenuEntry(const char* name, Menu* menu) {
this->name = name;
this->menu = menu;
this->isMenu = true;
}
void MenuEntry::run() {
if (isMenu)
{}
else
this->function();
if (this->callback)
this->callback();
}