From 3ff0e351f541c8d0127108a3c0a941a38f873634 Mon Sep 17 00:00:00 2001 From: "simon.kagstrom" Date: Thu, 26 Nov 2009 18:33:42 +0000 Subject: [PATCH] Add backgrounds --- main.cpp | 17 +++++++++++------ themes/default/bg_left.png | Bin 0 -> 289 bytes themes/default/bg_middle.png | Bin 0 -> 186 bytes themes/default/bg_right.png | Bin 0 -> 321 bytes themes/default/bg_submenu_left.png | Bin 0 -> 312 bytes themes/default/bg_submenu_middle.png | Bin 0 -> 207 bytes themes/default/bg_submenu_right.png | Bin 0 -> 341 bytes 7 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 themes/default/bg_left.png create mode 100644 themes/default/bg_middle.png create mode 100644 themes/default/bg_right.png create mode 100644 themes/default/bg_submenu_left.png create mode 100644 themes/default/bg_submenu_middle.png create mode 100644 themes/default/bg_submenu_right.png diff --git a/main.cpp b/main.cpp index 2506aee..d05d6a0 100644 --- a/main.cpp +++ b/main.cpp @@ -68,7 +68,8 @@ const char *main_menu_messages[] = { static void init(void) { TTF_Font *fnt; - SDL_Surface *bg_left, *bg_right, *bg_middle; + SDL_Surface *bg_left, *bg_right, *bg_middle, + *bg_submenu_left, *bg_submenu_right, *bg_submenu_middle; screen = SDL_SetVideoMode(640, 480, 16, SDL_DOUBLEBUF); @@ -79,16 +80,20 @@ static void init(void) fnt = read_and_alloc_font("font.ttf", 18); - bg_left = IMG_Load("bg_left.png"); - bg_right = IMG_Load("bg_right.png"); - bg_middle = IMG_Load("bg_middle.png"); - panic_if( !bg_left || !bg_right || !bg_middle, + bg_left = IMG_Load("themes/default/bg_left.png"); + bg_right = IMG_Load("themes/default/bg_right.png"); + bg_middle = IMG_Load("themes/default/bg_middle.png"); + bg_submenu_left = IMG_Load("themes/default/bg_submenu_left.png"); + bg_submenu_right = IMG_Load("themes/default/bg_submenu_right.png"); + bg_submenu_middle = IMG_Load("themes/default/bg_submenu_middle.png"); + panic_if( !bg_left || !bg_right || !bg_middle || + !bg_submenu_left || !bg_submenu_right || !bg_submenu_middle, "bg loading failed\n"); g_menu = new PrintMenu(new Font_TTF(fnt, 255, 255, 255)); g_menu->setText(main_menu_messages); g_menu->setSelectedBackground(bg_left, bg_middle, bg_right, - NULL, NULL, NULL); + bg_submenu_left, bg_submenu_middle, bg_submenu_right); } int main(int argc, char *argv[]) diff --git a/themes/default/bg_left.png b/themes/default/bg_left.png new file mode 100644 index 0000000000000000000000000000000000000000..1d87241fddd32ad7c0e05b077c9fe87fe821f1a4 GIT binary patch literal 289 zcmeAS@N?(olHy`uVBq!ia0vp^0zjBq!^2X+?^QKos)S9vL>4nJ za0`PlBg3pY5H=O_M6<|!Xn}yo_#wF6p}1)jVN)>&&^HED`9XhN=+d_wzLT@4mjtslxO{%yTR|D>SppRQ4wJ}d!$ii`vIp<%oX}uBt(DQ z*kC8{_|t3A6Eh7Me$-jF^5!HkOaEY8Ai|Ns%XG}(9`k}8E{o$oMAoo2zJ4UyvfKL7 fk*>opCY3TzZ!{J9T=Mt?&}9ssu6{1-oD!M<9Wi2j literal 0 HcmV?d00001 diff --git a/themes/default/bg_middle.png b/themes/default/bg_middle.png new file mode 100644 index 0000000000000000000000000000000000000000..eb206e367c20ef0f527501af566ffc1fb78473f6 GIT binary patch literal 186 zcmeAS@N?(olHy`uVBq!ia0vp^0zjBq!^2X+?^QKos)S9vL>4nJ za0`PlBg3pY5H=O_M6<|!lK&8Chg`03Q3l@MwB?`=jNv7l`uFLr6!i7rYMwW zmSiZnd-?{1H}Z)C6{&l=IEHu}e|yG|k%57Q!QhMiSJj5gyICXrz8`TuI@v)%fP;mp a@j=w32h2rZ%07c!$KdJe=d#Wzp$P!KeKUao literal 0 HcmV?d00001 diff --git a/themes/default/bg_right.png b/themes/default/bg_right.png new file mode 100644 index 0000000000000000000000000000000000000000..9866819ea89bcea9dc65a19b7c92648953a569af GIT binary patch literal 321 zcmeAS@N?(olHy`uVBq!ia0vp^0zjBq!^2X+?^QKos)S9vL>4nJ za0`PlBg3pY5H=O_M6<|!lFFMGx*YgLXst}5hc#~xw)x%B@E6*sfi`2DGKG8 zB^e6tp1uL$jeO!jMe96W978;gzrD7Rx7k2|^}>4&vjsaZB{AhcoOLsSH%o0nDw9hk zuXI36*O8zpEe=1{?tgNwZqxa*<=3{g?d@Q=$E>(xuP$qy>(`CPE-EmYoMkULd~*d; zZ2FA!-E2#EnByk?Z)^!*VED4PutBSmnPG<7T_pLF#}!B N;OXk;vd$@?2>?+IanAq% literal 0 HcmV?d00001 diff --git a/themes/default/bg_submenu_left.png b/themes/default/bg_submenu_left.png new file mode 100644 index 0000000000000000000000000000000000000000..989e0eee596c0911dfa713282fa470577048e810 GIT binary patch literal 312 zcmeAS@N?(olHy`uVBq!ia0vp^0zjBq!^2X+?^QKos)S9lS| zxv6<249-QVi6yBi3gww484B*6z5(HleBwYwlRaG=Lp+YZy>^hZ!GMSLf_!)Z(?`7> zP0Ac|gI;i~3;3Wn_kiT1h3tZBGWLltv^3YxEb3gLwMno^$!$m8X}gKu2dejapJIN! z$}fFSXP2iP{y1VN6KUOf($3&I>qK3k^B6o`{an^LB{Ts5!f9x~ literal 0 HcmV?d00001 diff --git a/themes/default/bg_submenu_middle.png b/themes/default/bg_submenu_middle.png new file mode 100644 index 0000000000000000000000000000000000000000..327a5dda76ccede532423f54cef21c4cb4a00431 GIT binary patch literal 207 zcmeAS@N?(olHy`uVBq!ia0vp^0zjBq!^2X+?^QKos)S9lBq!^2X+?^QKos)S9l}Kf60fd&zJ8m{`|CNzebrBk7xqVgE?=$ zo={I{-TIbG>qBy-^Uv6r8FK3t95Gv@kL-#4ZuK?aYD%_~w{RTMlX|KoO)TCgrTNR$8V9>Ky>>-+C1 ezTR^8GmGFOozq%;y9|JCXYh3Ob6Mw<&;$UbR(Rk5 literal 0 HcmV?d00001