summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/defs.h2
-rw-r--r--src/game.c4
-rw-r--r--src/menu.c14
3 files changed, 10 insertions, 10 deletions
diff --git a/src/defs.h b/src/defs.h
index 8fb9698..2683507 100644
--- a/src/defs.h
+++ b/src/defs.h
@@ -33,6 +33,7 @@
#define MF_TITLE_M 24 /* Margin under title */
#define MF_ROW_M 16 /* Margin between rows */
#define MF_COL_M 16 /* Margin between labels and entries */
+#define MF_WGT_B 1 /* Widget border */
#define MF_LBL_M 8 /* Margin between radio buttons and labels */
#define MF_CHK_BTN_W 16 /* Radio button and check box width */
#define MF_CHK_BTN_P 2 /* Radio button and check box padding */
@@ -40,7 +41,6 @@
#define MF_CHK_ITM_P 8 /* Radio button and check box label pad */
#define MF_BTN_M 8 /* Margin between buttons */
#define MF_BTN_P 8 /* Button padding */
-#define MF_BTN_B 1 /* Button border */
#define MF_TITLE_FONT_S 48 /* Title font size */
#define MF_TEXT_FONT_S 16 /* Regular text font size */
diff --git a/src/game.c b/src/game.c
index 237e126..e808a4b 100644
--- a/src/game.c
+++ b/src/game.c
@@ -53,11 +53,11 @@ _mf_game_form(SDL_Renderer *renderer, TTF_Font *text_font,
struct _mf_game *game)
{
game->timer = mftk_text_new(MF_DIGITS ":", 5, "00:00", text_font,
- MF_BTN_B, SDL_FALSE, NULL, NULL, NULL);
+ MF_WGT_B, SDL_FALSE, NULL, NULL, NULL);
return mftk_grid_new(2, 1, MF_ROW_M, MF_COL_M,
game->timer,
MFTK_GRID_HALIGN_R|MFTK_GRID_VALIGN_T,
- mftk_button_new(text_font, "Exit", MF_BTN_P, MF_BTN_B,
+ mftk_button_new(text_font, "Exit", MF_BTN_P, MF_WGT_B,
&_mf_game_exit, NULL, renderer),
MFTK_GRID_HALIGN_R|MFTK_GRID_VALIGN_B
);
diff --git a/src/menu.c b/src/menu.c
index 746347c..94afc68 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -167,10 +167,10 @@ _mf_menu_form(SDL_Renderer *renderer, TTF_Font *text_font,
}
menu->seed_text = mftk_text_new(MF_DIGITS, rand_max_len, menu->seed_buf,
- text_font, MF_BTN_B, SDL_TRUE, &_mf_menu_seed,
+ text_font, MF_WGT_B, SDL_TRUE, &_mf_menu_seed,
&_mf_menu_play, menu);
menu->enemies_text = mftk_text_new(MF_DIGITS, 2, menu->enemies_buf,
- text_font, MF_BTN_B, SDL_TRUE, &_mf_menu_enemies,
+ text_font, MF_WGT_B, SDL_TRUE, &_mf_menu_enemies,
&_mf_menu_play, menu);
grid = mftk_grid_new(6, 2, MF_ROW_M, MF_COL_M,
mftk_label_new(text_font, "Seed", renderer),
@@ -179,7 +179,7 @@ _mf_menu_form(SDL_Renderer *renderer, TTF_Font *text_font,
MFTK_GRID_HALIGN_L|MFTK_GRID_VALIGN_T,
mftk_label_new(text_font, "Size", renderer),
MFTK_GRID_HALIGN_R|MFTK_GRID_VALIGN_T,
- mftk_radio_new(MF_CHK_BTN_W, MF_CHK_BTN_P, MF_BTN_B,
+ mftk_radio_new(MF_CHK_BTN_W, MF_CHK_BTN_P, MF_WGT_B,
MF_CHK_LBL_P, MF_CHK_ITM_P, text_font,
&_mf_menu_size, &_mf_menu_play, menu, renderer,
0, 3, "15x15", "20x20", "30x30"),
@@ -190,13 +190,13 @@ _mf_menu_form(SDL_Renderer *renderer, TTF_Font *text_font,
MFTK_GRID_HALIGN_L|MFTK_GRID_VALIGN_T,
mftk_label_new(text_font, "Fog of war", renderer),
MFTK_GRID_HALIGN_R|MFTK_GRID_VALIGN_T,
- mftk_check_new(MF_CHK_BTN_W, MF_CHK_BTN_P, MF_BTN_B,
+ mftk_check_new(MF_CHK_BTN_W, MF_CHK_BTN_P, MF_WGT_B,
SDL_TRUE, 0, NULL, NULL, &_mf_menu_fow,
&_mf_menu_play, menu, renderer),
MFTK_GRID_HALIGN_L|MFTK_GRID_VALIGN_T,
mftk_label_new(text_font, "Reveal maze", renderer),
MFTK_GRID_HALIGN_R|MFTK_GRID_VALIGN_T,
- mftk_check_new(MF_CHK_BTN_W, MF_CHK_BTN_P, MF_BTN_B,
+ mftk_check_new(MF_CHK_BTN_W, MF_CHK_BTN_P, MF_WGT_B,
SDL_FALSE, 0, NULL, NULL, &_mf_menu_reveal,
&_mf_menu_play, menu, renderer),
MFTK_GRID_HALIGN_L|MFTK_GRID_VALIGN_T,
@@ -204,11 +204,11 @@ _mf_menu_form(SDL_Renderer *renderer, TTF_Font *text_font,
MFTK_GRID_HALIGN_R|MFTK_GRID_VALIGN_T,
mftk_grid_new(1, 2, 0, MF_BTN_M,
mftk_button_new(text_font, "Quit",
- MF_BTN_P, MF_BTN_B,
+ MF_BTN_P, MF_WGT_B,
&_mf_menu_quit, NULL, renderer),
MFTK_GRID_HALIGN_L|MFTK_GRID_VALIGN_T,
mftk_button_new(text_font, "Play",
- MF_BTN_P, MF_BTN_B,
+ MF_BTN_P, MF_WGT_B,
&_mf_menu_play, menu, renderer),
MFTK_GRID_HALIGN_L|MFTK_GRID_VALIGN_T
),