summaryrefslogtreecommitdiffstats
path: root/src/splash.c
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2021-08-04 21:11:41 (EDT)
committer P. J. McDermott <pj@pehjota.net>2021-08-04 21:12:05 (EDT)
commit10fe7025eb8025980b2ed2bcadee0e729485ae30 (patch)
treea463e965239edb3bde1e0ef10f37a34c53196bb6 /src/splash.c
parent4290eee6d45aab8e9f1c47d5d7d35e9ceccd78b2 (diff)
downloadmazefight-10fe7025eb8025980b2ed2bcadee0e729485ae30.zip
mazefight-10fe7025eb8025980b2ed2bcadee0e729485ae30.tar.gz
mazefight-10fe7025eb8025980b2ed2bcadee0e729485ae30.tar.bz2
splash: Add non-functional "Quit" button
Diffstat (limited to 'src/splash.c')
-rw-r--r--src/splash.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/splash.c b/src/splash.c
index dee2eb2..40d9f1e 100644
--- a/src/splash.c
+++ b/src/splash.c
@@ -29,6 +29,13 @@
#include "util.h"
static int
+_mf_splash_quit(void *user_data)
+{
+ SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Quitting");
+ return 0;
+}
+
+static int
_mf_splash_play(void *user_data)
{
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Playing");
@@ -83,9 +90,18 @@ mf_splash(SDL_Renderer *renderer)
mftk_grid_new(2, 1, MF_SPLASH_TITLE_M, 0,
mftk_label_new(title_font, "Maze Fight",
&text_color, renderer),
- mftk_button_new(text_font, "Play", &text_color,
- &butn_color, 2, &_mf_splash_play, NULL,
- renderer)
+ mftk_grid_new(1, 2, 0, MF_SPLASH_BTN_M,
+ mftk_button_new(text_font, "Quit",
+ &text_color, &butn_color,
+ MF_SPLASH_BTN_P,
+ &_mf_splash_quit, NULL,
+ renderer),
+ mftk_button_new(text_font, "Play",
+ &text_color, &butn_color,
+ MF_SPLASH_BTN_P,
+ &_mf_splash_play, NULL,
+ renderer)
+ )
)
);
/* TODO: Widgets */