Tweaks to the title screen, mainly for 800x600
Also: - Hide cores button if there are no addon cores installed - Remove "failsafe" core since it didn't work as advertised
This commit is contained in:
parent
381200979a
commit
2cde73888c
5 changed files with 9 additions and 10 deletions
|
@ -15,12 +15,3 @@ One Multiplayer Campaign with 14 Scenarios,
|
|||
500+ Add-ons.)"
|
||||
path="/"
|
||||
[/core]
|
||||
|
||||
[core]
|
||||
id=default_
|
||||
name= _ "Wesnoth (Failsafe)"
|
||||
rank=10
|
||||
image=icons/icon-game.png
|
||||
description= _ "Loads only mainline Wesnoth data without any add-ons."
|
||||
path="/"
|
||||
[/core]
|
||||
|
|
|
@ -211,6 +211,7 @@
|
|||
id = "large"
|
||||
description = "Large button"
|
||||
|
||||
{_GUI_RESOLUTION (window_width, window_height = 850, 650) 40 112 26 13 4 ({_GUI_BUTTON_FONT_SIZE}) () 255}
|
||||
{_GUI_RESOLUTION () 40 116 30 13 4 ({_GUI_BUTTON_FONT_SIZE}) () 255}
|
||||
|
||||
[/button_definition]
|
||||
|
|
|
@ -75,6 +75,7 @@
|
|||
id = "title_screen"
|
||||
description = "Definition of the panel for the title screen"
|
||||
|
||||
{_GUI_RESOLUTION (window_width,window_height = 850, 650) 10 5 10 5}
|
||||
{_GUI_RESOLUTION () 25 5 9 14 }
|
||||
|
||||
[/panel_definition]
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "gui/dialogs/title_screen.hpp"
|
||||
|
||||
#include "game_config.hpp"
|
||||
#include "game_config_manager.hpp"
|
||||
#include "game_preferences.hpp"
|
||||
#include "gettext.hpp"
|
||||
#include "log.hpp"
|
||||
|
@ -356,6 +357,11 @@ void ttitle_screen::pre_show(twindow& window)
|
|||
std::bind(&ttitle_screen::show_debug_clock_window,
|
||||
this,
|
||||
std::ref(window.video())));
|
||||
|
||||
auto cores = game_config_manager::get()->game_config().child_range("core");
|
||||
if(cores.size() <= 1) {
|
||||
find_widget<tbutton>(&window, "cores", false).set_visible(twindow::tvisible::invisible);
|
||||
}
|
||||
}
|
||||
|
||||
void ttitle_screen::update_tip(twindow& window, const bool previous)
|
||||
|
|
|
@ -831,7 +831,7 @@ static int do_gameloop(const std::vector<std::string>& args)
|
|||
|
||||
int current = 0;
|
||||
std::vector<config> cores;
|
||||
for (const config& core : game_config_manager::get()->game_config().child_range("core")) {
|
||||
for (const config& core : config_manager.game_config().child_range("core")) {
|
||||
cores.push_back(core);
|
||||
if (core["id"] == preferences::core_id())
|
||||
current = cores.size() -1;
|
||||
|
|
Loading…
Add table
Reference in a new issue