From 4a0692a6c205dc8ddf517ff862e32575566cb56f Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 05 Aug 2021 00:52:42 -0400 Subject: splash: Add another button --- 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, -- cgit v0.9.1