#pragma once
#include "pch.h"
/// Represents one menu item in a menu.
struct MenuItem {
char* text;
char key;
void* (*action)(void);
};
/// Is used for style-switching
/// - Default style with asterisks around the terminal
/// - Minimalistic design with bar instead of start>/item>
///
- No border, just plain text
enum MenuStyle {
DEFAULT,
MODERN,
NO_BORDER
};
/// Displaces a CUI menu to the user and lets them choose an option, then calls the corresponding function.
/// The length of the array itemv of menu items.
/// An array of all menu items to display in the menu.
/// The title of the menu.
/// If this parameter is set to true, the menu will be displayed again after an action is executed.
/// If this parameter is set to true, a pausecommand will be run after an action is executed.
/// Specifies the style in which the menu is displayed.
void show_menu(const int itemc, struct MenuItem itemv[], const char title[], bool loopback, bool pause, enum MenuStyle style);