MP Create Game: allow Leave button to fill all available space

This commit is contained in:
Charles Dang 2017-03-19 04:40:23 +11:00
parent 6b0cca611f
commit d465879c89
2 changed files with 13 additions and 33 deletions

View File

@ -404,37 +404,20 @@
grow_factor = 0
[column]
border = "all"
border_size = 5
horizontal_grow = true
[grid]
[row]
[column]
border = "all"
border_size = 5
[button]
id = "ok"
definition = "large"
label = _ "Im Ready"
[/button]
[/column]
[column]
border = "all"
border_size = 5
[button]
id = "cancel"
definition = "large"
label = _ "Leave"
[/button]
[/column]
[/row]
[/grid]
# This is exactly the size of two large-sized buttons (116 x 2) plus the interior
# border space between them (10). It keeps this column the same size as the corresponding
# one in MP Staging, which has the above layout (2 buttons, etc).
{GUI_FORCE_WIDGET_MINIMUM_SIZE 242 0 (
[button]
id = "cancel"
definition = "large"
label = _ "Leave"
[/button]
)}
[/column]
[/row]

View File

@ -296,9 +296,6 @@ void mp_join_game::pre_show(window& window)
plugins_context_->set_callback("launch", [&window](const config&) { window.set_retval(window::OK); }, false);
plugins_context_->set_callback("quit", [&window](const config&) { window.set_retval(window::CANCEL); }, false);
plugins_context_->set_callback("chat", [&chat](const config& cfg) { chat.send_chat_message(cfg["message"], false); }, true);
// TODO: the old mp wait dialog didn't have an OK button. Evaluate if we want to add one. Hiding it for now
find_widget<button>(&window, "ok", false).set_visible(widget::visibility::hidden);
}
void mp_join_game::generate_side_list(window& window)