mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-29 06:54:22 +01:00
Add backgrounds
This commit is contained in:
parent
35fcf68236
commit
3ff0e351f5
17
main.cpp
17
main.cpp
@ -68,7 +68,8 @@ const char *main_menu_messages[] = {
|
|||||||
static void init(void)
|
static void init(void)
|
||||||
{
|
{
|
||||||
TTF_Font *fnt;
|
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,
|
screen = SDL_SetVideoMode(640, 480, 16,
|
||||||
SDL_DOUBLEBUF);
|
SDL_DOUBLEBUF);
|
||||||
@ -79,16 +80,20 @@ static void init(void)
|
|||||||
|
|
||||||
fnt = read_and_alloc_font("font.ttf", 18);
|
fnt = read_and_alloc_font("font.ttf", 18);
|
||||||
|
|
||||||
bg_left = IMG_Load("bg_left.png");
|
bg_left = IMG_Load("themes/default/bg_left.png");
|
||||||
bg_right = IMG_Load("bg_right.png");
|
bg_right = IMG_Load("themes/default/bg_right.png");
|
||||||
bg_middle = IMG_Load("bg_middle.png");
|
bg_middle = IMG_Load("themes/default/bg_middle.png");
|
||||||
panic_if( !bg_left || !bg_right || !bg_middle,
|
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");
|
"bg loading failed\n");
|
||||||
|
|
||||||
g_menu = new PrintMenu(new Font_TTF(fnt, 255, 255, 255));
|
g_menu = new PrintMenu(new Font_TTF(fnt, 255, 255, 255));
|
||||||
g_menu->setText(main_menu_messages);
|
g_menu->setText(main_menu_messages);
|
||||||
g_menu->setSelectedBackground(bg_left, bg_middle, bg_right,
|
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[])
|
int main(int argc, char *argv[])
|
||||||
|
BIN
themes/default/bg_left.png
Normal file
BIN
themes/default/bg_left.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 289 B |
BIN
themes/default/bg_middle.png
Normal file
BIN
themes/default/bg_middle.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 186 B |
BIN
themes/default/bg_right.png
Normal file
BIN
themes/default/bg_right.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 321 B |
BIN
themes/default/bg_submenu_left.png
Normal file
BIN
themes/default/bg_submenu_left.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 312 B |
BIN
themes/default/bg_submenu_middle.png
Normal file
BIN
themes/default/bg_submenu_middle.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 207 B |
BIN
themes/default/bg_submenu_right.png
Normal file
BIN
themes/default/bg_submenu_right.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 341 B |
Loading…
Reference in New Issue
Block a user