Merge lp:~widelands-dev/widelands/multiplayer-ui into lp:widelands

Proposed by Toni Förster
Status: Merged
Merged at revision: 8793
Proposed branch: lp:~widelands-dev/widelands/multiplayer-ui
Merge into: lp:widelands
Diff against target: 112 lines (+18/-15)
2 files modified
src/ui_fsmenu/launch_mpg.cc (+15/-12)
src/wui/multiplayersetupgroup.cc (+3/-3)
To merge this branch: bzr merge lp:~widelands-dev/widelands/multiplayer-ui
Reviewer Review Type Date Requested Status
GunChleoc Approve
Review via email: mp+353523@code.launchpad.net

Commit message

Multiplayer-ui tweaks: less empty spaces and more space for important content.

- chat has more space
- map_info scales better
- client_info has no height restriction

Description of the change

Less free space and more room for the important parts. Pictures can be found in the Forum:

https://wl.widelands.org/forum/post/25724/

To post a comment you must log in.
Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 3827. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/418836717.
Appveyor build 3626. State: failed. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_multiplayer_ui-3626.

Revision history for this message
GunChleoc (gunchleoc) wrote :

LGTM :)

@bunnybot merge

review: Approve
Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 3831. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/419041575.
Appveyor build 3630. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_multiplayer_ui-3630.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/ui_fsmenu/launch_mpg.cc'
--- src/ui_fsmenu/launch_mpg.cc 2018-07-08 08:19:44 +0000
+++ src/ui_fsmenu/launch_mpg.cc 2018-08-22 06:40:59 +0000
@@ -105,7 +105,7 @@
105 padding_(4),105 padding_(4),
106 indent_(10),106 indent_(10),
107 label_height_(20),107 label_height_(20),
108 right_column_x_(get_w() * 37 / 50),108 right_column_x_(get_w() * 57 / 80),
109109
110 // Buttons110 // Buttons
111 change_map_or_save_(this,111 change_map_or_save_(this,
@@ -130,17 +130,17 @@
130 // Text labels130 // Text labels
131 mapname_(this, right_column_x_, get_h() * 3 / 20, std::string()),131 mapname_(this, right_column_x_, get_h() * 3 / 20, std::string()),
132 clients_(this,132 clients_(this,
133 // (get_w() * 57 / 80) is the width of the MultiPlayerSetupGroup133 // the width of the MultiPlayerSetupGroup is (get_w() * 53 / 80)
134 get_w() / 50,134 get_w() * 3 / 80,
135 get_h() / 10,135 get_h() / 10,
136 (get_w() * 57 / 80) / 3,136 get_w() * 19 / 80,
137 get_h() / 10,137 get_h() / 10,
138 _("Clients"),138 _("Clients"),
139 UI::Align::kCenter),139 UI::Align::kCenter),
140 players_(this,140 players_(this,
141 get_w() / 50 + (get_w() * 57 / 80) * 6 / 15,141 get_w() /4,
142 get_h() / 10,142 get_h() / 10,
143 (get_w() * 57 / 80) * 9 / 15,143 get_w() * 9 / 20,
144 get_h() / 10,144 get_h() / 10,
145 _("Players"),145 _("Players"),
146 UI::Align::kCenter),146 UI::Align::kCenter),
@@ -155,13 +155,13 @@
155 right_column_x_,155 right_column_x_,
156 get_h() * 2 / 10,156 get_h() * 2 / 10,
157 butw_,157 butw_,
158 get_h() * 23 / 80 - 2 * label_height_,158 get_h() * 23 / 80 - 1.6 * label_height_,
159 UI::PanelStyle::kFsMenu),159 UI::PanelStyle::kFsMenu),
160 client_info_(this,160 client_info_(this,
161 right_column_x_,161 right_column_x_,
162 get_h() * 13 / 20 - 2 * label_height_,162 get_h() * 13 / 20 - 2 * label_height_,
163 butw_,163 butw_,
164 2 * label_height_,164 get_h(),
165 UI::PanelStyle::kFsMenu),165 UI::PanelStyle::kFsMenu),
166 help_(nullptr),166 help_(nullptr),
167167
@@ -185,12 +185,14 @@
185 players_.set_color(RGBColor(0, 255, 0));185 players_.set_color(RGBColor(0, 255, 0));
186 map_.set_fontsize(fs_);186 map_.set_fontsize(fs_);
187 map_.set_color(RGBColor(0, 255, 0));187 map_.set_color(RGBColor(0, 255, 0));
188 wincondition_type_.set_color(RGBColor(0, 255, 0));
188189
189 mapname_.set_text(_("(no map)"));190 mapname_.set_text(_("(no map)"));
190 map_info_.set_text(_("The host has not yet selected a map or saved game."));191 map_info_.set_text(_("The host has not yet selected a map or saved game."));
191192
192 mpsg_ = new MultiPlayerSetupGroup(193 mpsg_ = new MultiPlayerSetupGroup(
193 this, get_w() / 50, change_map_or_save_.get_y(), get_w() * 57 / 80, get_h(), settings, buth_);194 this, get_w() * 3 / 80, change_map_or_save_.get_y(), get_w() * 53 / 80,
195 get_h() * 17 / 30 - change_map_or_save_.get_y(), settings, buth_);
194196
195 // If we are the host, open the map or save selection menu at startup197 // If we are the host, open the map or save selection menu at startup
196 if (settings_->settings().usernum == 0 && settings_->settings().mapname.empty()) {198 if (settings_->settings().usernum == 0 && settings_->settings().mapname.empty()) {
@@ -205,7 +207,7 @@
205 suggested_teams_box_ =207 suggested_teams_box_ =
206 new UI::SuggestedTeamsBox(this, right_column_x_, 0, UI::Box::Vertical, padding_, indent_,208 new UI::SuggestedTeamsBox(this, right_column_x_, 0, UI::Box::Vertical, padding_, indent_,
207 get_w() - right_column_x_, 4 * label_height_);209 get_w() - right_column_x_, 4 * label_height_);
208}210 }
209211
210FullscreenMenuLaunchMPG::~FullscreenMenuLaunchMPG() {212FullscreenMenuLaunchMPG::~FullscreenMenuLaunchMPG() {
211 delete mpsg_;213 delete mpsg_;
@@ -223,8 +225,9 @@
223 */225 */
224void FullscreenMenuLaunchMPG::set_chat_provider(ChatProvider& chat) {226void FullscreenMenuLaunchMPG::set_chat_provider(ChatProvider& chat) {
225 delete chat_;227 delete chat_;
226 chat_ = new GameChatPanel(this, get_w() / 50, get_h() * 13 / 20, get_w() * 57 / 80,228 chat_ = new GameChatPanel(this, get_w() * 3/ 80,
227 get_h() * 3 / 10, chat, UI::PanelStyle::kFsMenu);229 get_h() * 17 / 30 + 0.5 * label_height_, get_w() * 53 / 80,
230 get_h() * 11 / 30, chat, UI::PanelStyle::kFsMenu);
228}231}
229232
230/**233/**
231234
=== modified file 'src/wui/multiplayersetupgroup.cc'
--- src/wui/multiplayersetupgroup.cc 2018-06-08 17:14:28 +0000
+++ src/wui/multiplayersetupgroup.cc 2018-08-22 06:40:59 +0000
@@ -628,16 +628,16 @@
628 settings_(settings),628 settings_(settings),
629 npsb(new NetworkPlayerSettingsBackend(settings_)),629 npsb(new NetworkPlayerSettingsBackend(settings_)),
630 clientbox(this, 0, 0, UI::Box::Vertical),630 clientbox(this, 0, 0, UI::Box::Vertical),
631 playerbox(this, 0, 0, UI::Box::Vertical, w * 9 / 15, h, kPadding),631 playerbox(this, 0, 0, UI::Box::Vertical, w * 36 / 53, h, kPadding),
632 buth_(buth) {632 buth_(buth) {
633 clientbox.set_size(w / 3, h);633 clientbox.set_size(w * 16 / 53, h);
634 clientbox.set_scrolling(true);634 clientbox.set_scrolling(true);
635635
636 add(&clientbox, UI::Box::Resizing::kExpandBoth);636 add(&clientbox, UI::Box::Resizing::kExpandBoth);
637 add(&playerbox);637 add(&playerbox);
638638
639 // Playerbox639 // Playerbox
640 playerbox.set_size(w * 9 / 15, h);640 playerbox.set_size(w * 36 / 53, h);
641 playerbox.add_space(0);641 playerbox.add_space(0);
642 multi_player_player_groups.resize(kMaxPlayers);642 multi_player_player_groups.resize(kMaxPlayers);
643 for (PlayerSlot i = 0; i < multi_player_player_groups.size(); ++i) {643 for (PlayerSlot i = 0; i < multi_player_player_groups.size(); ++i) {

Subscribers

People subscribed via source and target branches

to status/vote changes: