summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2021-08-05 00:52:42 (EDT)
committer P. J. McDermott <pj@pehjota.net>2021-08-05 00:52:42 (EDT)
commit4a0692a6c205dc8ddf517ff862e32575566cb56f (patch)
tree250459f913dbcf42753d15ef7071a40f6f7d09a7 /src
parentcbf4234dff0b594d84ab8c976d7cde7334fc4877 (diff)
downloadmazefight-4a0692a6c205dc8ddf517ff862e32575566cb56f.zip
mazefight-4a0692a6c205dc8ddf517ff862e32575566cb56f.tar.gz
mazefight-4a0692a6c205dc8ddf517ff862e32575566cb56f.tar.bz2
splash: Add another button
Diffstat (limited to 'src')
-rw-r--r--src/splash.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/splash.c b/src/splash.c
index e189361..c6ee9c8 100644
--- a/src/splash.c
+++ b/src/splash.c
@@ -37,6 +37,14 @@ _mf_splash_fow(void *user_data, int state)
}
static int
+_mf_splash_reveal(void *user_data, int state)
+{
+ SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Reveal maze: %s",
+ state ? "enabled" : "disabled");
+ return 0;
+}
+
+static int
_mf_splash_quit(void *user_data)
{
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Quitting");
@@ -95,7 +103,7 @@ mf_splash(SDL_Renderer *renderer)
box = mftk_box_new(MF_WINDOW_W, MF_WINDOW_H, 0, 0, MF_SPLASH_FORM_P,
&form_color,
- mftk_grid_new(3, 1, MF_SPLASH_TITLE_M, 0,
+ mftk_grid_new(4, 1, MF_SPLASH_TITLE_M, 0,
mftk_label_new(title_font, "Maze Fight",
&text_color, renderer),
mftk_check_new(MF_SPLASH_CHK_BTN_W,
@@ -104,6 +112,12 @@ mf_splash(SDL_Renderer *renderer)
MF_SPLASH_CHK_LBL_P, text_font,
"Fog of war", &text_color,
_mf_splash_fow, NULL, renderer),
+ mftk_check_new(MF_SPLASH_CHK_BTN_W,
+ MF_SPLASH_CHK_BTN_P, &chkb_color,
+ &chkm_color, SDL_FALSE,
+ MF_SPLASH_CHK_LBL_P, text_font,
+ "Reveal maze", &text_color,
+ _mf_splash_reveal, NULL, renderer),
mftk_grid_new(1, 2, 0, MF_SPLASH_BTN_M,
mftk_button_new(text_font, "Quit",
&text_color, &butn_color,