diff --git a/Src/gui/disc_menu.cpp b/Src/gui/disc_menu.cpp index 7ba5d31..59e23b6 100644 --- a/Src/gui/disc_menu.cpp +++ b/Src/gui/disc_menu.cpp @@ -209,5 +209,5 @@ void DiscView::draw(SDL_Surface *where) SDL_BlitSurface(Gui::gui->disc_info, NULL, where, &dst); this->menu->draw(where, 50, 70, 280, 375); - this->gameInfo->draw(where, 360, 55, 262, 447); + this->gameInfo->draw(where, 390, 55, 242, 447); } diff --git a/Src/gui/game_info_box.hh b/Src/gui/game_info_box.hh index 7e1b2ac..6b3617d 100644 --- a/Src/gui/game_info_box.hh +++ b/Src/gui/game_info_box.hh @@ -61,32 +61,28 @@ public: dst = (SDL_Rect){x + w / 2 - this->gi->screenshot->w / 2, y, w, h}; SDL_BlitSurface(this->gi->screenshot, NULL, where, &dst); - Menu::draw(where, x, y + this->gi->screenshot->h + 10, - w, h - this->gi->screenshot->h - 10); + Menu::draw(where, x + 20, y + this->gi->screenshot->h + 10, + w - 20, h - this->gi->screenshot->h - 10); } else - Menu::draw(where, x, y + 10, w, h - 10); + Menu::draw(where, x + 20, y + 288 / 2 + 2, w - 20, h - 10); } void updateMessages() { this->setText(NULL); - memset(this->gi_messages, 0, sizeof(this->gi_messages)); - this->gi_messages[0] = "Game:"; - this->gi_messages[1] = " "; - this->gi_messages[2] = "Author:"; - this->gi_messages[3] = " "; - this->gi_messages[4] = "Year:"; - this->gi_messages[5] = " "; + for (unsigned i = 0; i < ARRAY_SIZE(this->gi_messages) - 1; i++) + this->gi_messages[i] = " "; + this->gi_messages[ARRAY_SIZE(this->gi_messages) - 1] = NULL; if (this->gi) { snprintf(this->year, sizeof(this->year), "%d", this->gi->year); - this->gi_messages[1] = this->gi->name ? this->gi->name : " "; + this->gi_messages[0] = this->gi->name ? this->gi->name : " "; this->gi_messages[3] = this->gi->author ? this->gi->author : " "; - this->gi_messages[5] = year; } + this->gi_messages[6] = year; this->setText(this->gi_messages); } diff --git a/Src/gui/game_info_menu.cpp b/Src/gui/game_info_menu.cpp index 48f3b21..c20b224 100644 --- a/Src/gui/game_info_menu.cpp +++ b/Src/gui/game_info_menu.cpp @@ -139,7 +139,7 @@ public: SDL_BlitSurface(Gui::gui->disc_info, NULL, where, &dst); this->menu->draw(where, 50, 70, 280, 375); - this->gameInfo->draw(where, 360, 55, 262, 447); + this->gameInfo->draw(where, 390, 55, 242, 447); } protected: diff --git a/Src/gui/gui.cpp b/Src/gui/gui.cpp index e8420de..d6117b6 100644 --- a/Src/gui/gui.cpp +++ b/Src/gui/gui.cpp @@ -84,6 +84,7 @@ Gui::Gui() this->keyboard = NULL; this->default_font = NULL; this->dialogue_bg = NULL; + this->network_info = NULL; this->small_font = NULL; this->n_views = 0; @@ -153,6 +154,7 @@ Gui::~Gui() SDL_FreeSurface(this->infobox); SDL_FreeSurface(this->dialogue_bg); SDL_FreeSurface(this->disc_info); + SDL_FreeSurface(this->network_info); SDL_FreeSurface(this->textbox); SDL_FreeSurface(this->selected_key); SDL_FreeSurface(this->highlighted_key); @@ -181,6 +183,7 @@ bool Gui::setTheme(const char *path) 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->network_info = this->loadThemeImage(path, "network_info.png"); this->highlighted_key = this->loadThemeImage(path, "highlighted_key.png"); this->selected_key = this->loadThemeImage(path, "selected_key.png"); @@ -196,6 +199,7 @@ bool Gui::setTheme(const char *path) !this->selected_key || !this->highlighted_key || !this->status_bar_bg || + !this->network_info || !this->default_font || !this->small_font) { @@ -207,6 +211,7 @@ bool Gui::setTheme(const char *path) SDL_FreeSurface(this->bg_submenu_right); SDL_FreeSurface(this->background); SDL_FreeSurface(this->main_menu_bg); + SDL_FreeSurface(this->network_info); SDL_FreeSurface(this->infobox); SDL_FreeSurface(this->dialogue_bg); SDL_FreeSurface(this->disc_info); diff --git a/Src/gui/gui.hh b/Src/gui/gui.hh index 1afacb0..a16127e 100644 --- a/Src/gui/gui.hh +++ b/Src/gui/gui.hh @@ -91,6 +91,7 @@ public: SDL_Surface *keyboard; SDL_Surface *dialogue_bg; SDL_Surface *disc_info; + SDL_Surface *network_info; SDL_Surface *bg_left, *bg_right, *bg_middle, *bg_submenu_left, *bg_submenu_right, *bg_submenu_middle; SDL_Surface *highlighted_key; diff --git a/Src/gui/network_user_menu.cpp b/Src/gui/network_user_menu.cpp index be64ebb..fdc8320 100644 --- a/Src/gui/network_user_menu.cpp +++ b/Src/gui/network_user_menu.cpp @@ -102,7 +102,7 @@ public: dst = (SDL_Rect){x + w / 2 - screenshot->w / 2, y, w, h}; SDL_BlitSurface(screenshot, NULL, where, &dst); - Menu::draw(where, x, y + screenshot->h + 10, w, h - screenshot->h - 10); + Menu::draw(where, x + 20, y + screenshot->h + 10, w - 20, h - screenshot->h - 10); } @@ -111,12 +111,12 @@ public: this->setText(NULL); memset(this->pi_messages, 0, sizeof(this->pi_messages)); - this->pi_messages[0] = "Name:"; - this->pi_messages[1] = " "; - this->pi_messages[2] = "Region:"; - this->pi_messages[3] = " "; - this->pi_messages[4] = " "; /* Maybe add something here later */ - this->pi_messages[5] = " "; + this->pi_messages[0] = " "; + this->pi_messages[1] = "Name:"; + this->pi_messages[2] = " "; + this->pi_messages[3] = "Region:"; + this->pi_messages[4] = " "; + this->pi_messages[5] = " "; /* Maybe add something here later */ if (this->pi) { @@ -252,8 +252,8 @@ void NetworkUserView::draw(SDL_Surface *where) SDL_BlitSurface(Gui::gui->main_menu_bg, NULL, where, &dst); dst = (SDL_Rect){350,13,0,0}; - SDL_BlitSurface(Gui::gui->disc_info, NULL, where, &dst); + SDL_BlitSurface(Gui::gui->network_info, NULL, where, &dst); this->menu->draw(where, 50, 70, 280, 375); - this->peerInfo->draw(where, 360, 55, 262, 447); + this->peerInfo->draw(where, 390, 55, 242, 447); } diff --git a/themes/default/disc_info.png b/themes/default/disc_info.png index dac041d..862574a 100644 Binary files a/themes/default/disc_info.png and b/themes/default/disc_info.png differ diff --git a/themes/default/network_info.png b/themes/default/network_info.png new file mode 100644 index 0000000..93b6026 Binary files /dev/null and b/themes/default/network_info.png differ