mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-28 07:22:21 -08:00
Fixed #8435
This commit is contained in:
parent
cd7088d241
commit
4db085bd07
1 changed files with 5 additions and 3 deletions
|
|
@ -472,7 +472,7 @@ public class JoinDialog extends BaseDialog{
|
|||
}
|
||||
|
||||
int columns(){
|
||||
return Mathf.clamp((int)((Core.graphics.getWidth() * 0.85f) / targetWidth()), 1, 3);
|
||||
return Mathf.clamp((int)((Core.graphics.getWidth() / Scl.scl() * 0.85f) / targetWidth()), 1, 3);
|
||||
}
|
||||
|
||||
void addCommunityHost(Host host, Table container){
|
||||
|
|
@ -520,12 +520,14 @@ public class JoinDialog extends BaseDialog{
|
|||
totalHosts++;
|
||||
float w = targetWidth();
|
||||
|
||||
local.row();
|
||||
if((local.getChildren().size) % columns() == 0){
|
||||
local.row();
|
||||
}
|
||||
|
||||
local.button(b -> buildServer(host, b), style, () -> {
|
||||
Events.fire(new ClientPreConnectEvent(host));
|
||||
safeConnect(host.address, host.port, host.version);
|
||||
}).width(w);
|
||||
}).width(w).top().left().growY();
|
||||
}
|
||||
|
||||
public void connect(String ip, int port){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue