mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-22 11:29:24 +01:00
More images, better look
This commit is contained in:
parent
a554c546fa
commit
f4db8a7b36
@ -56,6 +56,7 @@ Gui::Gui()
|
||||
this->bg_submenu_middle = NULL;
|
||||
this->bg_submenu_right = NULL;
|
||||
this->background = NULL;
|
||||
this->main_menu_bg = NULL;
|
||||
|
||||
this->main_font = NULL;
|
||||
this->main_menu = new MainMenu(NULL);
|
||||
@ -72,6 +73,7 @@ bool Gui::setTheme(const char *path)
|
||||
this->bg_submenu_right = this->loadThemeImage(path, "bg_submenu_right.png");
|
||||
|
||||
this->background = this->loadThemeImage(path, "background.png");
|
||||
this->main_menu_bg = this->loadThemeImage(path, "main_menu_bg.png");
|
||||
|
||||
this->main_font = this->loadThemeFont(path, "font.ttf");
|
||||
|
||||
@ -87,6 +89,7 @@ bool Gui::setTheme(const char *path)
|
||||
SDL_FreeSurface(this->bg_submenu_middle);
|
||||
SDL_FreeSurface(this->bg_submenu_right);
|
||||
SDL_FreeSurface(this->background);
|
||||
SDL_FreeSurface(this->main_menu_bg);
|
||||
|
||||
if (this->main_font)
|
||||
delete this->main_font;
|
||||
@ -121,11 +124,15 @@ void Gui::pushEvent(SDL_Event *ev)
|
||||
|
||||
void Gui::draw(SDL_Surface *where)
|
||||
{
|
||||
SDL_Rect dst;
|
||||
|
||||
if (!this->is_active)
|
||||
return;
|
||||
|
||||
SDL_BlitSurface(this->background, NULL, screen, NULL);
|
||||
this->main_menu->draw(where, 50, 100, 300, 400);
|
||||
dst = (SDL_Rect){20,45,300,400};
|
||||
SDL_BlitSurface(this->main_menu_bg, NULL, screen, &dst);
|
||||
this->main_menu->draw(where, 50, 70, 300, 400);
|
||||
}
|
||||
|
||||
void Gui::activate()
|
||||
|
@ -47,10 +47,10 @@ private:
|
||||
|
||||
bool is_active;
|
||||
Menu *focus; /* Where the focus goes */
|
||||
|
||||
SDL_Surface *background;
|
||||
Menu *main_menu;
|
||||
|
||||
SDL_Surface *background;
|
||||
SDL_Surface *main_menu_bg;
|
||||
SDL_Surface *bg_left, *bg_right, *bg_middle,
|
||||
*bg_submenu_left, *bg_submenu_right, *bg_submenu_middle;
|
||||
|
||||
|
BIN
themes/default/infobox.png
Normal file
BIN
themes/default/infobox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
themes/default/main_menu_bg.png
Normal file
BIN
themes/default/main_menu_bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
themes/default/textbox.png
Normal file
BIN
themes/default/textbox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Loading…
Reference in New Issue
Block a user