Now supporting single Arguments #9

Merged
Stausssi merged 1 commits from paging into master 2020-01-23 13:18:49 +01:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit da73f62ea7 - Show all commits

2
menu.c
View File

@ -63,7 +63,7 @@ void show_menu(const struct MenuPage* pages, const size_t page_count, const bool
{
// Perform action
system("cls");
pages[page_index].items[i].action();
pages[page_index].items[i].action(pages[page_index].items[i].param);
action_performed = true;
// Pause if requested

3
menu.h
View File

@ -6,7 +6,8 @@
struct MenuItem {
char* text;
char key;
void* (*action)(void);
void* (*action)(void* params);
void* param;
};
/// <summary>Represents a border in which a menu is displayed.</summary>