From 6a45a31b8b7e1a88dc5b6354f12ad40ea43e7dd3 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 06 Aug 2021 20:04:00 -0400 Subject: tk: Add text widget event callback --- (limited to 'src/splash.c') diff --git a/src/splash.c b/src/splash.c index 3c743a3..5c9adb7 100644 --- a/src/splash.c +++ b/src/splash.c @@ -32,6 +32,14 @@ #include "util.h" static int +_mf_splash_seed(void *user_data, const char *seed) +{ + SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "Seed: %ld", atol(seed)); + + return 0; +} + +static int _mf_splash_size(void *user_data, int state) { switch (state) { @@ -116,7 +124,7 @@ _mf_splash_form(SDL_Renderer *renderer, TTF_Font *text_font, mftk_label_new(text_font, "Seed", text_color, renderer), MFTK_GRID_HALIGN_R|MFTK_GRID_VALIGN_T, mftk_text_new('0', '9', rand_max_len, seed, text_font, - text_color), + text_color, _mf_splash_seed, NULL), MFTK_GRID_HALIGN_L|MFTK_GRID_VALIGN_T, mftk_label_new(text_font, "Size", text_color, renderer), MFTK_GRID_HALIGN_R|MFTK_GRID_VALIGN_T, -- cgit v0.9.1