mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-04 16:01:17 +00:00
Moved init_language() to the game_controller_abstract
This commit is contained in:
parent
fe81c82a8d
commit
23cbd74535
@ -311,24 +311,6 @@ bool game_controller::init_config(const bool force)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool game_controller::init_language()
|
||||
{
|
||||
if(!::load_language_list())
|
||||
return false;
|
||||
|
||||
::set_language(get_locale());
|
||||
|
||||
if(!cmdline_opts_.nogui) {
|
||||
std::string wm_title_string = _("The Battle for Wesnoth");
|
||||
wm_title_string += " - " + game_config::revision;
|
||||
SDL_WM_SetCaption(wm_title_string.c_str(), NULL);
|
||||
}
|
||||
|
||||
hotkey::load_descriptions();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool game_controller::play_test()
|
||||
{
|
||||
static bool first_time = true;
|
||||
|
@ -50,7 +50,6 @@ public:
|
||||
~game_controller();
|
||||
|
||||
bool init_config() { return init_config(false); }
|
||||
bool init_language();
|
||||
bool play_test();
|
||||
bool play_multiplayer_mode();
|
||||
bool play_screenshot_mode();
|
||||
|
@ -16,6 +16,9 @@
|
||||
#include "game_controller_abstract.hpp"
|
||||
|
||||
#include "game_display.hpp"
|
||||
#include "gettext.hpp"
|
||||
#include "hotkeys.hpp"
|
||||
#include "language.hpp"
|
||||
#include "preferences_display.hpp"
|
||||
|
||||
#include <iostream>
|
||||
@ -39,6 +42,24 @@ game_display& game_controller_abstract::disp()
|
||||
return *disp_.get();
|
||||
}
|
||||
|
||||
bool game_controller_abstract::init_language()
|
||||
{
|
||||
if(!::load_language_list())
|
||||
return false;
|
||||
|
||||
::set_language(get_locale());
|
||||
|
||||
if(!cmdline_opts_.nogui) {
|
||||
std::string wm_title_string = _("The Battle for Wesnoth");
|
||||
wm_title_string += " - " + game_config::revision;
|
||||
SDL_WM_SetCaption(wm_title_string.c_str(), NULL);
|
||||
}
|
||||
|
||||
hotkey::load_descriptions();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool game_controller_abstract::init_video()
|
||||
{
|
||||
if(cmdline_opts_.nogui) {
|
||||
|
@ -33,7 +33,7 @@ public:
|
||||
|
||||
bool init_video();
|
||||
virtual bool init_config() = 0;
|
||||
virtual bool init_language() = 0;
|
||||
bool init_language();
|
||||
virtual bool play_test() = 0;
|
||||
virtual bool play_multiplayer_mode() = 0;
|
||||
virtual bool play_screenshot_mode() = 0;
|
||||
|
@ -34,11 +34,6 @@ bool game_controller_new::init_config()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool game_controller_new::init_language()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool game_controller_new::play_test()
|
||||
{
|
||||
return true;
|
||||
|
@ -26,7 +26,6 @@ public:
|
||||
~game_controller_new();
|
||||
|
||||
bool init_config();
|
||||
bool init_language();
|
||||
bool play_test();
|
||||
bool play_multiplayer_mode();
|
||||
bool play_screenshot_mode();
|
||||
|
Loading…
x
Reference in New Issue
Block a user