projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed unused max_score_multiplier and score_multiplier
[supertux.git]
/
src
/
options_menu.cpp
diff --git
a/src/options_menu.cpp
b/src/options_menu.cpp
index
0060f30
..
ccadc44
100644
(file)
--- a/
src/options_menu.cpp
+++ b/
src/options_menu.cpp
@@
-36,7
+36,6
@@
enum OptionsMenuIDs {
MNID_FULLSCREEN_RESOLUTION,
MNID_MAGNIFICATION,
MNID_ASPECTRATIO,
MNID_FULLSCREEN_RESOLUTION,
MNID_MAGNIFICATION,
MNID_ASPECTRATIO,
- MNID_STRETCH_TO_WINDOW,
MNID_PROFILES,
MNID_SOUND,
MNID_MUSIC
MNID_PROFILES,
MNID_SOUND,
MNID_MUSIC
@@
-72,13
+71,13
@@
public:
config->locale = "";
dictionary_manager.set_language(config->locale);
config->save();
config->locale = "";
dictionary_manager.set_language(config->locale);
config->save();
- Menu::
set_current(0
);
+ Menu::
pop_current(
);
}
else if (item->id == 1) {
config->locale = "en";
dictionary_manager.set_language(config->locale);
config->save();
}
else if (item->id == 1) {
config->locale = "en";
dictionary_manager.set_language(config->locale);
config->save();
- Menu::
set_current(0
);
+ Menu::
pop_current(
);
}
int mnid = 10;
std::set<std::string> languages = dictionary_manager.get_languages();
}
int mnid = 10;
std::set<std::string> languages = dictionary_manager.get_languages();
@@
-88,7
+87,7
@@
public:
config->locale = locale_name;
dictionary_manager.set_language(config->locale);
config->save();
config->locale = locale_name;
dictionary_manager.set_language(config->locale);
config->save();
- Menu::
set_current(0
);
+ Menu::
pop_current(
);
}
}
}
}
}
}
@@
-148,9
+147,6
@@
OptionsMenu::OptionsMenu()
magnification->list.push_back("200%");
magnification->list.push_back("250%");
magnification->list.push_back("200%");
magnification->list.push_back("250%");
- add_toggle(MNID_STRETCH_TO_WINDOW, _("Stretch to Window"), config->stretch_to_window)
- ->set_help(_("Use the fullscreen resolution and stretch SuperTux to fill the given window"));
-
SDL_Rect** modes = SDL_ListModes(NULL, SDL_FULLSCREEN|SDL_OPENGL);
if (modes == (SDL_Rect **)0)
SDL_Rect** modes = SDL_ListModes(NULL, SDL_FULLSCREEN|SDL_OPENGL);
if (modes == (SDL_Rect **)0)
@@
-191,22
+187,25
@@
OptionsMenu::OptionsMenu()
aspect->list.push_back("16:9");
aspect->list.push_back("1368:768");
aspect->list.push_back("16:9");
aspect->list.push_back("1368:768");
- std::ostringstream out;
- out << config->aspect_width << ":" << config->aspect_height;
- std::string aspect_ratio = out.str();
- for(std::vector<std::string>::iterator i = aspect->list.begin(); i != aspect->list.end(); ++i)
+ if (config->aspect_width != 0 && config->aspect_height != 0)
{
{
- if(*i == aspect_ratio)
+ std::ostringstream out;
+ out << config->aspect_width << ":" << config->aspect_height;
+ std::string aspect_ratio = out.str();
+ for(std::vector<std::string>::iterator i = aspect->list.begin(); i != aspect->list.end(); ++i)
{
{
- aspect_ratio.clear();
- break;
+ if(*i == aspect_ratio)
+ {
+ aspect_ratio.clear();
+ break;
+ }
}
}
- }
- if (!aspect_ratio.empty())
- {
- aspect->selected = aspect->list.size();
- aspect->list.push_back(aspect_ratio);
+ if (!aspect_ratio.empty())
+ {
+ aspect->selected = aspect->list.size();
+ aspect->list.push_back(aspect_ratio);
+ }
}
if (sound_manager->is_audio_enabled()) {
}
if (sound_manager->is_audio_enabled()) {
@@
-215,8
+214,8
@@
OptionsMenu::OptionsMenu()
add_toggle(MNID_MUSIC, _("Music"), config->music_enabled)
->set_help(_("Disable all music"));
} else {
add_toggle(MNID_MUSIC, _("Music"), config->music_enabled)
->set_help(_("Disable all music"));
} else {
- add_
de
active(MNID_SOUND, _("Sound (disabled)"));
- add_
de
active(MNID_MUSIC, _("Music (disabled)"));
+ add_
in
active(MNID_SOUND, _("Sound (disabled)"));
+ add_
in
active(MNID_MUSIC, _("Music (disabled)"));
}
add_submenu(_("Setup Keyboard"), main_controller->get_key_options_menu())
}
add_submenu(_("Setup Keyboard"), main_controller->get_key_options_menu())
@@
-280,7
+279,8
@@
OptionsMenu::menu_action(MenuItem* item)
case MNID_FULLSCREEN:
if(config->use_fullscreen != options_menu->is_toggled(MNID_FULLSCREEN)) {
config->use_fullscreen = !config->use_fullscreen;
case MNID_FULLSCREEN:
if(config->use_fullscreen != options_menu->is_toggled(MNID_FULLSCREEN)) {
config->use_fullscreen = !config->use_fullscreen;
- init_video();
+ init_video(); // FIXME: Should call apply_config instead
+ Menu::recalc_pos();
config->save();
}
break;
config->save();
}
break;