projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
preload sounds
[supertux.git]
/
src
/
options_menu.cpp
diff --git
a/src/options_menu.cpp
b/src/options_menu.cpp
index
a87676e
..
93ab43d
100644
(file)
--- a/
src/options_menu.cpp
+++ b/
src/options_menu.cpp
@@
-42,6
+42,7
@@
public:
add_label(_("Language"));
add_hl();
add_entry(0, std::string("(")+_("auto-detect language")+")");
add_label(_("Language"));
add_hl();
add_entry(0, std::string("(")+_("auto-detect language")+")");
+ add_entry(1, "English");
int mnid = 10;
std::set<std::string> languages = dictionary_manager.get_languages();
int mnid = 10;
std::set<std::string> languages = dictionary_manager.get_languages();
@@
-66,6
+67,12
@@
public:
config->save();
Menu::set_current(0);
}
config->save();
Menu::set_current(0);
}
+ else if (item->id == 1) {
+ config->locale = "en";
+ dictionary_manager.set_language(config->locale);
+ config->save();
+ Menu::set_current(0);
+ }
int mnid = 10;
std::set<std::string> languages = dictionary_manager.get_languages();
for (std::set<std::string>::iterator i = languages.begin(); i != languages.end(); i++) {
int mnid = 10;
std::set<std::string> languages = dictionary_manager.get_languages();
for (std::set<std::string>::iterator i = languages.begin(); i != languages.end(); i++) {
@@
-151,14
+158,13
@@
OptionsMenu::menu_action(MenuItem* item)
Menu* get_options_menu()
{
Menu* get_options_menu()
{
- //
if(options_menu == NULL)
+ //
static OptionsMenu menu;
options_menu = new OptionsMenu();
options_menu = new OptionsMenu();
-
return options_menu;
}
void free_options_menu()
{
delete options_menu;
return options_menu;
}
void free_options_menu()
{
delete options_menu;
- options_menu =
NULL
;
+ options_menu =
0
;
}
}