[[Minor UI fixes]]
- fixed bug where 'cancel' button would appear under multiplayer games - fixed preferences widgets disappearing when changing video mode
This commit is contained in:
parent
700ee319ba
commit
a367e9c394
4 changed files with 29 additions and 13 deletions
|
@ -131,6 +131,10 @@ public:
|
|||
cancel_button_->draw();
|
||||
}
|
||||
|
||||
void clear_widgets() {
|
||||
cancel_button_.assign(NULL);
|
||||
}
|
||||
|
||||
lobby::RESULT process() {
|
||||
int mousex, mousey;
|
||||
const bool button = SDL_GetMouseState(&mousex,&mousey)&SDL_BUTTON_LMASK;
|
||||
|
@ -429,6 +433,8 @@ void play_multiplayer_client(display& disp, game_data& units_data, config& cfg,
|
|||
std::vector<std::string> messages;
|
||||
config game_data;
|
||||
const lobby::RESULT dialog_res = lobby::enter(disp,game_data,cfg,&waiter,messages);
|
||||
waiter.clear_widgets();
|
||||
|
||||
if(waiter.status == wait_for_start::GAME_CANCELLED) {
|
||||
gui::show_dialog(disp,NULL,"",string_table["game_cancelled"],
|
||||
gui::OK_ONLY);
|
||||
|
|
|
@ -598,17 +598,17 @@ void show_preferences_dialog(display& disp)
|
|||
if(redraw_all) {
|
||||
restorer.cancel();
|
||||
gui::draw_dialog(xpos,ypos,width,height,disp,string_table["preferences"],NULL,&buttons,&restorer);
|
||||
fullscreen_button.draw();
|
||||
turbo_button.draw();
|
||||
grid_button.draw();
|
||||
floating_labels_button.draw();
|
||||
close_button.draw();
|
||||
resolution_button.draw();
|
||||
turn_dialog_button.draw();
|
||||
turn_bell_button.draw();
|
||||
side_colours_button.draw();
|
||||
colour_cursors_button.draw();
|
||||
hotkeys_button.draw();
|
||||
fullscreen_button.set_dirty();
|
||||
turbo_button.set_dirty();
|
||||
grid_button.set_dirty();
|
||||
floating_labels_button.set_dirty();
|
||||
close_button.set_dirty();
|
||||
resolution_button.set_dirty();
|
||||
turn_dialog_button.set_dirty();
|
||||
turn_bell_button.set_dirty();
|
||||
side_colours_button.set_dirty();
|
||||
colour_cursors_button.set_dirty();
|
||||
hotkeys_button.set_dirty();
|
||||
|
||||
font::draw_text(&disp,clip_rect,14,font::NORMAL_COLOUR,music_label,
|
||||
music_rect.x,music_rect.y);
|
||||
|
|
|
@ -263,9 +263,11 @@ report generate_report(TYPE type, const gamemap& map, const unit_map& units,
|
|||
const std::string& name = map.terrain_name(terrain);
|
||||
const std::vector<std::string>& underlying_names = map.underlying_terrain_name(terrain);
|
||||
|
||||
str << translate_string(name);
|
||||
const std::string& translated_name = translate_string(name);
|
||||
|
||||
if(underlying_names.size() != 1 || underlying_names.front() != name) {
|
||||
str << translated_name;
|
||||
|
||||
if(underlying_names.size() != 1 || translate_string(underlying_names.front()) != translated_name) {
|
||||
str << " (";
|
||||
|
||||
for(std::vector<std::string>::const_iterator i = underlying_names.begin(); i != underlying_names.end(); ++i) {
|
||||
|
|
|
@ -312,6 +312,10 @@ SOURCE=.\src\theme.cpp
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\titlescreen.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\tooltips.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -564,6 +568,10 @@ SOURCE=.\src\theme.hpp
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\titlescreen.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\tooltips.hpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
|
Loading…
Add table
Reference in a new issue