mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-11 03:08:38 +07:00
Updated to build 32, UI layout fixes
This commit is contained in:
parent
594c49ac91
commit
565c3ed12f
@ -1,7 +1,7 @@
|
||||
#Autogenerated file. Do not modify.
|
||||
#Tue Mar 06 23:33:29 EST 2018
|
||||
#Wed Mar 07 00:00:12 EST 2018
|
||||
version=release
|
||||
androidBuildCode=337
|
||||
androidBuildCode=339
|
||||
name=Mindustry
|
||||
code=3.4
|
||||
build=custom build
|
||||
build=32
|
||||
|
@ -1,6 +1,7 @@
|
||||
package io.anuke.mindustry.ui.dialogs;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.math.MathUtils;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.io.Platform;
|
||||
@ -14,6 +15,7 @@ import io.anuke.ucore.scene.ui.Dialog;
|
||||
import io.anuke.ucore.scene.ui.ImageButton;
|
||||
import io.anuke.ucore.scene.ui.ScrollPane;
|
||||
import io.anuke.ucore.scene.ui.TextButton;
|
||||
import io.anuke.ucore.scene.ui.layout.Cell;
|
||||
import io.anuke.ucore.scene.ui.layout.Table;
|
||||
import io.anuke.ucore.util.Bundles;
|
||||
import io.anuke.ucore.util.Log;
|
||||
@ -217,7 +219,22 @@ public class JoinDialog extends FloatingDialog {
|
||||
content().addCenteredImageTextButton("$text.server.add", "icon-add", "clear", 14*3, () -> {
|
||||
renaming = null;
|
||||
add.show();
|
||||
}).width(w).height(80f);
|
||||
}).marginLeft(6).width(w).height(80f).update(button -> {
|
||||
float pw = w;
|
||||
float pad = 0f;
|
||||
if(pane.getChildren().first().getPrefHeight() > pane.getHeight()){
|
||||
pw = w + 30;
|
||||
pad = 6;
|
||||
}
|
||||
|
||||
Cell<TextButton> cell = ((Table)pane.getParent()).getCell(button);
|
||||
|
||||
if(!MathUtils.isEqual(cell.getMinWidth(), pw)){
|
||||
cell.width(pw);
|
||||
cell.padLeft(pad);
|
||||
pane.getParent().invalidateHierarchy();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void addLocalHosts(Array<Host> array){
|
||||
|
@ -121,7 +121,8 @@ public class WebsocketClient implements ClientProvider {
|
||||
if (!msg.startsWith("---")) return;
|
||||
String[] text = msg.substring(3).split("\\|");
|
||||
Host host = new Host(text[1], address, text[2], Strings.parseInt(text[3]),
|
||||
Strings.parseInt(text[0]), Strings.parseInt(text[4]));
|
||||
Strings.parseInt(text[0]),
|
||||
text.length > 4 && Strings.canParsePostiveInt(text[4]) ? Strings.parseInt(text[4]) : 0);
|
||||
valid.accept(host);
|
||||
accepted[0] = true;
|
||||
socket.close();
|
||||
|
Loading…
Reference in New Issue
Block a user