diff --git a/src/game_initialization/multiplayer_configure.cpp b/src/game_initialization/multiplayer_configure.cpp index 7e6a03e80158..d72414dd4596 100644 --- a/src/game_initialization/multiplayer_configure.cpp +++ b/src/game_initialization/multiplayer_configure.cpp @@ -84,6 +84,7 @@ configure::configure(game_display& disp, const config &cfg, chat& c, config& gam observers_game_(disp.video(), _("Observers"), gui::button::TYPE_CHECK), oos_debug_(disp.video(), _("Debug OOS"), gui::button::TYPE_CHECK), shuffle_sides_(disp.video(), _("Shuffle sides"), gui::button::TYPE_CHECK), + random_faction_mode_label_(disp.video(), _("Random Factions:"), font::SIZE_SMALL, font::LOBBY_COLOR), random_faction_mode_(disp, std::vector()), cancel_game_(disp.video(), _("Back")), launch_game_(disp.video(), _("OK")), @@ -186,6 +187,8 @@ configure::configure(game_display& disp, const config &cfg, chat& c, config& gam shuffle_sides_.set_check(engine_.shuffle_sides_default()); shuffle_sides_.set_help_string(_("Assign sides to players at random")); + random_faction_mode_label_.set_help_string(_("Allow for mirror matchups when random factions are chosen")); + std::vector translated_modes; for(size_t i = 0; i < mp_game_settings::RANDOM_FACTION_MODE_COUNT; ++i) { std::string mode_str = mp_game_settings::RANDOM_FACTION_MODE_to_string(static_cast (i)); @@ -193,7 +196,7 @@ configure::configure(game_display& disp, const config &cfg, chat& c, config& gam } random_faction_mode_.set_items(translated_modes); random_faction_mode_.set_selected(engine_.random_faction_mode()); - random_faction_mode_.set_help_string(_("Independent: Random factions assigned independently uniformly at random\nNo Mirror: No two players will get the same faction\nNo Ally Mirror: No two allied players will get the same faction")); + random_faction_mode_.set_help_string(_("Independent: Random factions assigned independently\nNo Mirror: No two players will get the same faction\nNo Ally Mirror: No two allied players will get the same faction")); #if 0 // The possible vision settings @@ -497,6 +500,7 @@ void configure::hide_children(bool hide) observers_game_.hide(hide); oos_debug_.hide(hide); shuffle_sides_.hide(hide); + random_faction_mode_label_.hide(hide); random_faction_mode_.hide(hide); cancel_game_.hide(hide); launch_game_.hide(hide); @@ -549,8 +553,8 @@ void configure::layout_children(const SDL_Rect& rect) int slider_width = options_pane_left_.width() - 40; - int xpos_left = 0; - int ypos_left = 0; + unsigned int xpos_left = 0; + unsigned int ypos_left = 0; ypos_left += 2 * border_size; options_pane_left_.add_widget(&shuffle_sides_, xpos_left, ypos_left); @@ -558,14 +562,19 @@ void configure::layout_children(const SDL_Rect& rect) xpos_left + (options_pane_left_.width() - xpos_left) / 2 + border_size, ypos_left); ypos_left += shuffle_sides_.height() + border_size; + options_pane_left_.add_widget(&random_faction_mode_label_, xpos_left, ypos_left); + xpos_left += random_faction_mode_label_.width() + border_size; + options_pane_left_.add_widget(&random_faction_mode_, xpos_left, ypos_left); + xpos_left += random_faction_mode_.width() + border_size; if(!local_players_only_) { options_pane_left_.add_widget(&password_button_, - (ca.x + first_column_width / 2) - 40, ypos_left); + std::max(xpos_left + 2* border_size, (options_pane_left_.width() / 2) + border_size), ypos_left); } else { password_button_.hide(true); } + xpos_left = 0; ypos_left += random_faction_mode_.height() + border_size; options_pane_left_.add_widget(&countdown_game_, xpos_left, ypos_left); diff --git a/src/game_initialization/multiplayer_configure.hpp b/src/game_initialization/multiplayer_configure.hpp index 91b80ddb9a50..7145bce72cef 100644 --- a/src/game_initialization/multiplayer_configure.hpp +++ b/src/game_initialization/multiplayer_configure.hpp @@ -79,6 +79,7 @@ class configure : public mp::ui gui::button observers_game_; gui::button oos_debug_; gui::button shuffle_sides_; + gui::label random_faction_mode_label_; gui::combo random_faction_mode_; gui::button cancel_game_;