From b52c401665e2cbb82a6434d6a5e854f825e6bc89 Mon Sep 17 00:00:00 2001 From: "simon.kagstrom" Date: Sun, 13 Dec 2009 10:10:33 +0000 Subject: [PATCH] Add disc info box --- disc_menu.cpp | 11 ++++------- gui.cpp | 3 +++ gui.hh | 1 + themes/default/disc_info.png | Bin 0 -> 2201 bytes 4 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 themes/default/disc_info.png diff --git a/disc_menu.cpp b/disc_menu.cpp index 46041737..5e5b0e9 100644 --- a/disc_menu.cpp +++ b/disc_menu.cpp @@ -77,7 +77,7 @@ public: this->bg = NULL; this->infobox = NULL; - this->textbox = NULL; + this->disc_info = NULL; } ~DiscView() @@ -94,7 +94,7 @@ public: { this->bg = Gui::gui->main_menu_bg; this->infobox = Gui::gui->infobox; - this->textbox = Gui::gui->textbox; + this->disc_info = Gui::gui->disc_info; this->menu->setFont(Gui::gui->default_font); this->menu->setSelectedBackground(Gui::gui->bg_left, Gui::gui->bg_middle, @@ -121,10 +121,7 @@ public: SDL_BlitSurface(this->bg, NULL, where, &dst); dst = (SDL_Rect){350,13,0,0}; - SDL_BlitSurface(this->infobox, NULL, where, &dst); - - dst = (SDL_Rect){350,242,0,0}; - SDL_BlitSurface(this->textbox, NULL, where, &dst); + SDL_BlitSurface(this->disc_info, NULL, where, &dst); this->menu->draw(where, 50, 70, 300, 400); } @@ -133,5 +130,5 @@ protected: DiscMenu *menu; SDL_Surface *bg; SDL_Surface *infobox; - SDL_Surface *textbox; + SDL_Surface *disc_info; }; diff --git a/gui.cpp b/gui.cpp index 0741e8d..c81db07 100644 --- a/gui.cpp +++ b/gui.cpp @@ -74,6 +74,7 @@ bool Gui::setTheme(const char *path) this->infobox = this->loadThemeImage(path, "infobox.png"); this->textbox = this->loadThemeImage(path, "textbox.png"); this->dialogue_bg = this->loadThemeImage(path, "dialogue_box.png"); + this->disc_info = this->loadThemeImage(path, "disc_info.png"); this->default_font = this->loadThemeFont(path, "font.ttf", 18); this->small_font = this->loadThemeFont(path, "font.ttf", 16); @@ -82,6 +83,7 @@ bool Gui::setTheme(const char *path) !this->bg_submenu_left || !this->bg_submenu_right || !this->bg_submenu_middle || !this->dialogue_bg || + !this->disc_info || !this->default_font || !this->small_font) { @@ -95,6 +97,7 @@ bool Gui::setTheme(const char *path) SDL_FreeSurface(this->main_menu_bg); SDL_FreeSurface(this->infobox); SDL_FreeSurface(this->dialogue_bg); + SDL_FreeSurface(this->disc_info); SDL_FreeSurface(this->textbox); if (this->default_font) diff --git a/gui.hh b/gui.hh index 4c2267f..0459139 100644 --- a/gui.hh +++ b/gui.hh @@ -72,6 +72,7 @@ public: SDL_Surface *infobox; SDL_Surface *textbox; SDL_Surface *dialogue_bg; + SDL_Surface *disc_info; SDL_Surface *bg_left, *bg_right, *bg_middle, *bg_submenu_left, *bg_submenu_right, *bg_submenu_middle; diff --git a/themes/default/disc_info.png b/themes/default/disc_info.png new file mode 100644 index 0000000000000000000000000000000000000000..dac041ddc41d29116a3ffe39db1cf95e086501aa GIT binary patch literal 2201 zcmeAS@N?(olHy`uVBq!ia0y~yU=#r2GaPI{5!r9w9f1^Mage(c!@6@aFM%AkByV>Y zhW{YAVDIwDKoQOYkH}&M25w;xW@MN(M*=9wUgGKN%6^lFmy1K}|I-W+ppayVYeb22 zer|4RUI~M9QEFmIYKlU6W=V#EyQgnJcq5-UP}>(z7srr_TW{}f^b5(9Ireb6arQ&8 zXbG zd%8`E;S9Lmu5#P+o?4{urb$mqC#~Id_h&^^{gDfvY)iJ9MXN~q8qG{mJIQ-p*6&W* zq;$_|lXIrLJ@>p=bi%b;Z?39b_7scp{_*VDBpdzPbIa4M6xMFNIotEu*0z!{-4}z9^8@k`?Rdecm5l$B~{Viu4lbuj?v-vl>7R5TmIXI zkms`9g#ldRH-jdv-1S^(D^t+XWXqGXpIf=#r%pO)C20ALXUVN?I$i8MJ=UILtFQmN z&Z=_PnE$qzgiiVD>vf-XeM*gXXG}BLu9gZ)DLOchD3u=<^Ip6GvO`1PfB;=9dR zjK50vdVF`h&hU3vsLD(O_63cdN+)+%GVu0@dmcN(n31r?!zhW*fmzvglJ+wOlMl{` zY!1%%IXN!OXkcJs;^0tFXlP)7QXoE%2N6cdGBJS_p~xa@g3Br>AT$l6k%Pq@@USE+ zw8+wgh=9QoYlFodlqEMd$uzLViFu`U4?)@z*_l*8m-x3ewzbYV_|RqhXehf`(g*7qhdew)4e)`Z7l z3Z9=#PF5Q;uM)F)`<3688ED@8Nq5Z56;8fg#rc&f$Th|Gf3tcyNa@U(!&R>i+SX9?z_$ueR1NSvYs@+~oS;?A&ibyXNoPoxHB#;a(r3${Rb~ z_iInM>wMKyTTr57s{7iCD|{#Bb=>JT7TmEyY|@?8(*3uhXUIj*`t2!pR$8xTU`ME#U7%exfohdG4vH4-eA5-l