From f4db8a7b368bc99f4d53a0f022eba4c5bfe065c7 Mon Sep 17 00:00:00 2001 From: "simon.kagstrom" Date: Sat, 28 Nov 2009 08:59:42 +0000 Subject: [PATCH] More images, better look --- frodo_menu.cpp | 9 ++++++++- frodo_menu.hh | 4 ++-- themes/default/infobox.png | Bin 0 -> 1731 bytes themes/default/main_menu_bg.png | Bin 0 -> 2267 bytes themes/default/textbox.png | Bin 0 -> 1523 bytes 5 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 themes/default/infobox.png create mode 100644 themes/default/main_menu_bg.png create mode 100644 themes/default/textbox.png diff --git a/frodo_menu.cpp b/frodo_menu.cpp index 39147b4..a03b37b 100644 --- a/frodo_menu.cpp +++ b/frodo_menu.cpp @@ -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() diff --git a/frodo_menu.hh b/frodo_menu.hh index fc20038..6163f14 100644 --- a/frodo_menu.hh +++ b/frodo_menu.hh @@ -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; diff --git a/themes/default/infobox.png b/themes/default/infobox.png new file mode 100644 index 0000000000000000000000000000000000000000..0ff3e46ee43ea8b0f69317a0c8e6d46eb84fefbf GIT binary patch literal 1731 zcmeAS@N?(olHy`uVBq!ia0y~yU=#qd?{TmJ$*=R{Q-Ks?age(c!@6@aFM%AkByV>Y zhW{YAVDIwDKoQOYkH}&M25w;xW@MN(M*=9wUgGKN%6^kuhQpF!O70_|JcDG3Yeb22 zer|4RUI~M9QEFmIYKlU6W=V#EyQgnJcq5-U&~!OZ7srr_TW{~4&lgUYJMgePEs0~N zkZPmHx~(r+QXAi}PF;7)^-)0Q?Y75R{0oiPe{?@+aIKDbJ5gq$h0CG^Opi8Y-sIqq z+&PiSQ)G#4>w$_nwl13XuT;#I(b`6zqID>`nd7bYNhzxmPb!RM7maIn$Etz_Iih13A2CJ z%g(Sn)o(A}Ikj^Axw?rzZamoj_S%=bkA8UkKfGgW*~iOS-yZ*0RfxX)Dc@4_ zW=rAWdtXZaef)cIef^J`aOO!@FBM%fH!(LbxRHEh!**SLeber%M<@F6ZF?s%VU3y9 zMSGjF#ZP97+%W%S!>`S~`T6Cn+E;sl+T7IpLyqk?^t&;Co@tt1PI-grt-Pm&ON{Cc zb0pq(PdPo++9t2HMg1eWF{nRSYG${$=+O$(~Qr3X1HY;WmjgkdTIJL9*;Y>>o3n}Si9$T z$B(bCl1nbVe0iXZt-Xyub?e2G@hmF9Ksj2`FgILreY9ZvhCeL)|)*REdp|9*Um8#S`a+@Y{#akD7&Dam;K$CN*+f(j-P+zwc^ec5r^&9 zfU(GT@*wA8hF#NS=5$OBia)B-u#TJ3>*YqG9m)YiL{ysjxy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p2GLaK^J zIN2nGnjFvqLP#Jngokj`?k3pRqawc?6$q8Ba`cHMT!3)1D#$E>y6TPr;TWeCQ}{vx zV1T6-e&ohs?O$Rw1?cJR%5#j-Vx$Pn#xNCEdFXyrz=}pFQi36Odo4kS;g#n!amk3V z9xzyl8+GQ)oPsWj0RtzCOo?6#Qou=!4)%GChP`@=!|8U!pkB0GU_+B^MwVWh*GK<= z;~cW1J>&$j;jScG=k047!aUsmE?W*!43@4q!aL?wca8*8gIB1Xc}OWYtB;Co!!%NY za}TGAj=x&i66Q%JbyStj=D6|g@{Q~{w#{cq$3#{wHRMn3Ftk;b8D3svwLevKf2JF( z>)Fgh)sd>JM6)@HAu>bam%KH$v1ZapePQlq$ADr9d|6;;|I5Hqbe%H(_FojEtS&3! zG|$m~H>d8*;NcVYy^Y@yMn$jcLq-%fQ{(*M-R1>V5Q8B0l-ruv2`}ffy7IT< zQ?Fi|uq7t(4sZ_mkQg1jUR4qlyI6hah@6{Ev$dy4CEHTUxcq=Bo{Rxy5N$zM9UUJ* v#&d2HY0d<$1_QX2W(i{F_y1g9u~(ul4OxV_twCKzz8L@!@9!<#6?WlYNK~q> literal 0 HcmV?d00001 diff --git a/themes/default/textbox.png b/themes/default/textbox.png new file mode 100644 index 0000000000000000000000000000000000000000..1930b84ae78eea4746b01573351f9d3ebbdbb197 GIT binary patch literal 1523 zcmeAS@N?(olHy`uVBq!ia0vp^KN%PpSvlB%EX52*Hz37W9OUlAui(P=vF z&&^HED`9XhN=+?88+3j_e)k68#ezygFpA_S}X;zBz$w}vh(v18z&3xiGNj&#@&7AHN?adc= zs%U$@fqHRd3xbbT;##V%iE_ud8gC^(sc3~L^r6`E-xl`vRzts{f5qu{`)^IYFKnSRW$C52)5D9zcO7v0eV)~LuXE#k&rkQ} zBrKeJx1RIO!^5TFn+`tu{dTi;d+vOASUV@M zJ*wyQy+4oddDVqJ2$;I`(%0pOzlIt&zFPCHzvi&b0xN0HOWNh3e}PP|{a=iC<{AYo z*Z%ACuAA@5OE>$;?D7nyyKbI;a#GDBl_i1!%f0_rm`PrF<8+^AL6&`|jFx(l zfTco_!;^*+j1!ra*j@NQxI+de=!lSj2*M<&qS}oCuWblt5MvuHRVxf!C^1fK21QNr z>-Tk&%%3q_t-9_1>6XlbsP(@+%g!*a+Irdl(-|Q5{4dXKXMx}QNuZ~FY(EAgzc(xFuDP5&R)NgHQ6*tWk~`r7jeFr)cw zO4AGI-FoS3WA=6VS==FygU`=b%HRDgc2eo)#@6j|Rp%Z~wej3`hF$DlV;{fEy|T0I zDyP#}xU+Yb%vl`vX-n+q8(n)^apQ&oUWz~Jp zPbc;~yz>2ifBIkd<5fGHDi?1qTx&h2?W;<9zwnQZ;h&sW{{ojKx7QywzgxauwXy=J zdb!xoeK)E-*QrJNZc?nU2)i+R=ADaAkKViAT)+07=ihu_0fbtLeTn?kTs`^ZUH||9 literal 0 HcmV?d00001