diff --git a/src/menu.c b/src/menu.c index 0387754..1153eee 100644 --- a/src/menu.c +++ b/src/menu.c @@ -47,7 +47,8 @@ static void menu_main_load(char* str); static void menu_main_new(char* str); // Small menu. static void menu_small_close(char* str); -static void edit_options(void); +static void edit_options(char* str); +static void menu_small_exit(char* str); static void exit_game(void); // Information menu. static void menu_info_close(char* str); @@ -130,12 +131,12 @@ void menu_small(void) { BUTTON_WIDTH, BUTTON_HEIGHT, "btnResume", "Resume", menu_small_close); - window_addButton(wid, 20, 20, BUTTON_WIDTH, BUTTON_HEIGHT, - "btnExit", "Exit", (void(*)(char*))exit_game); - window_addButton(wid, 20, 20 + BUTTON_HEIGHT + 20, BUTTON_WIDTH, BUTTON_HEIGHT, "btnOptions", "Options", (void(*)(char*))edit_options); + + window_addButton(wid, 20, 20, BUTTON_WIDTH, BUTTON_HEIGHT, + "btnExit", "Exit", menu_small_exit); menu_Open(MENU_SMALL); } @@ -147,8 +148,16 @@ static void menu_small_close(char* str) { menu_Close(MENU_SMALL); } +static void menu_small_exit(char* str) { + (void)str; + window_destroy(window_get("Menu")); + menu_Close(MENU_SMALL); + menu_main(); +} + // Edit the options. -static void edit_options(void) { +static void edit_options(char* str) { + (void)str; // TODO }