mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Save the server index when it changes #187
This commit is contained in:
parent
2bf2e7f958
commit
f15194b6f8
@ -309,7 +309,7 @@ impl MainMenuUi {
|
||||
.w_h(400.0, 300.0)
|
||||
.set(self.ids.servers_frame, ui_widgets);
|
||||
|
||||
let net_settings = &global_state.settings.networking;
|
||||
let ref mut net_settings = global_state.settings.networking;
|
||||
|
||||
// TODO: Draw scroll bar or remove it.
|
||||
let (mut items, _scrollbar) = List::flow_down(net_settings.servers.len())
|
||||
@ -346,6 +346,7 @@ impl MainMenuUi {
|
||||
{
|
||||
// TODO: Set as current server address
|
||||
self.server_address = net_settings.servers[item.i].clone();
|
||||
net_settings.default_server = item.i;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user