Made configfile save on quit button press, panel close, options menu close
This commit is contained in:
parent
50adb09a4b
commit
87dbf8d9a3
|
@ -149,4 +149,5 @@ void djui_panel_shutdown(void) {
|
||||||
gDjuiPanelMainCreated = false;
|
gDjuiPanelMainCreated = false;
|
||||||
gDjuiPanelPauseCreated = false;
|
gDjuiPanelPauseCreated = false;
|
||||||
djui_cursor_set_visible(false);
|
djui_cursor_set_visible(false);
|
||||||
|
configfile_save(configfile_name());
|
||||||
}
|
}
|
|
@ -1,10 +1,11 @@
|
||||||
#include "djui.h"
|
#include "djui.h"
|
||||||
#include "src/pc/controller/controller_sdl.h"
|
#include "src/pc/controller/controller_sdl.h"
|
||||||
|
#include "src/pc/pc_main.h"
|
||||||
|
|
||||||
bool gDjuiPanelMainCreated = false;
|
bool gDjuiPanelMainCreated = false;
|
||||||
|
|
||||||
static void djui_panel_main_quit_yes(struct DjuiBase* caller) {
|
static void djui_panel_main_quit_yes(struct DjuiBase* caller) {
|
||||||
exit(0);
|
game_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void djui_panel_main_quit(struct DjuiBase* caller) {
|
static void djui_panel_main_quit(struct DjuiBase* caller) {
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
#include "djui.h"
|
#include "djui.h"
|
||||||
#include "src/pc/utils/misc.h"
|
#include "src/pc/utils/misc.h"
|
||||||
|
|
||||||
|
void djui_panel_options_back(struct DjuiBase* caller) {
|
||||||
|
configfile_save(configfile_name());
|
||||||
|
djui_panel_menu_back(caller);
|
||||||
|
}
|
||||||
|
|
||||||
void djui_panel_options_create(struct DjuiBase* caller) {
|
void djui_panel_options_create(struct DjuiBase* caller) {
|
||||||
f32 bodyHeight = 64 * 5 + 16 * 4;
|
f32 bodyHeight = 64 * 5 + 16 * 4;
|
||||||
|
|
||||||
|
@ -38,7 +43,7 @@ void djui_panel_options_create(struct DjuiBase* caller) {
|
||||||
djui_base_set_size_type(&button6->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
djui_base_set_size_type(&button6->base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
|
||||||
djui_base_set_size(&button6->base, 1.0f, 64);
|
djui_base_set_size(&button6->base, 1.0f, 64);
|
||||||
djui_button_set_style(button6, 1);
|
djui_button_set_style(button6, 1);
|
||||||
djui_interactable_hook_click(&button6->base, djui_panel_menu_back);
|
djui_interactable_hook_click(&button6->base, djui_panel_options_back);
|
||||||
}
|
}
|
||||||
|
|
||||||
djui_panel_add(caller, &panel->base, defaultBase);
|
djui_panel_add(caller, &panel->base, defaultBase);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "djui.h"
|
#include "djui.h"
|
||||||
#include "pc/cheats.h"
|
#include "pc/cheats.h"
|
||||||
|
#include "src/pc/pc_main.h"
|
||||||
|
|
||||||
bool gDjuiPanelPauseCreated = false;
|
bool gDjuiPanelPauseCreated = false;
|
||||||
|
|
||||||
|
@ -8,7 +9,7 @@ static void djui_panel_pause_resume(struct DjuiBase* caller) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void djui_panel_pause_quit_yes(struct DjuiBase* caller) {
|
static void djui_panel_pause_quit_yes(struct DjuiBase* caller) {
|
||||||
exit(0);
|
game_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void djui_panel_pause_quit(struct DjuiBase* caller) {
|
static void djui_panel_pause_quit(struct DjuiBase* caller) {
|
||||||
|
|
Loading…
Reference in New Issue