diff options
author | P. J. McDermott <pj@pehjota.net> | 2021-03-18 16:59:33 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2021-03-18 16:59:33 (EDT) |
commit | 0917cbc2c4ab3ce2e84a633a8df94d670ae44c7e (patch) | |
tree | 628bd920510a29356cca6a77c0e0ba02e28192ca /src | |
parent | fc8446c9c6cb702a56fb275a56706f80dba75d6f (diff) | |
download | dodge-balls-0917cbc2c4ab3ce2e84a633a8df94d670ae44c7e.zip dodge-balls-0917cbc2c4ab3ce2e84a633a8df94d670ae44c7e.tar.gz dodge-balls-0917cbc2c4ab3ce2e84a633a8df94d670ae44c7e.tar.bz2 |
main-menu: Generalize title text function
Diffstat (limited to 'src')
-rw-r--r-- | src/main-menu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main-menu.c b/src/main-menu.c index 7ac9157..30ba76b 100644 --- a/src/main-menu.c +++ b/src/main-menu.c @@ -27,13 +27,13 @@ #include "util.h" static SDL_Texture * -_db_main_menu_title(TTF_Font *font, SDL_Color *color, +_db_main_menu_text(TTF_Font *font, const char *text, SDL_Color *color, SDL_Renderer *renderer, SDL_Rect *rect) { SDL_Surface *surface; SDL_Texture *texture; - surface = TTF_RenderText_Blended(font, "Dodge Balls", *color); + surface = TTF_RenderText_Blended(font, text, *color); if (surface == NULL) { db_err("Failed to create surface (%s)", TTF_GetError()); return NULL; @@ -88,8 +88,8 @@ db_main_menu(void) free(font_path); return; } - texture_title = _db_main_menu_title(font, &text_color, renderer, - &dest_rect); + texture_title = _db_main_menu_text(font, "Dodge Balls", &text_color, + renderer, &dest_rect); if (texture_title == NULL) { free(font_path); TTF_CloseFont(font); |