Fixed compilation errors / Re-added basic trace dialog

This commit is contained in:
Anuken
2019-05-10 16:02:05 -04:00
parent 0ff56e3a68
commit 68faae69c5
7 changed files with 52 additions and 33 deletions

View File

@@ -1,21 +1,26 @@
package io.anuke.mindustry.ui.dialogs;
import io.anuke.arc.Core;
import io.anuke.arc.scene.ui.layout.Table;
import io.anuke.mindustry.entities.type.Player;
import io.anuke.mindustry.net.Administration.TraceInfo;
public class TraceDialog extends FloatingDialog{
public TraceDialog(){
super("$trace");
addCloseButton();
setFillParent(false);
}
/*
public void show(Player player, SessionInfo info){
public void show(Player player, TraceInfo info){
cont.clear();
Table table = new Table("clear");
table.margin(14);
table.defaults().pad(1);
/*
table.defaults().left();
table.add(Core.bundle.format("trace.playername", player.name));
table.row();
@@ -23,33 +28,16 @@ public class TraceDialog extends FloatingDialog{
table.row();
table.add(Core.bundle.format("trace.id", info.uuid));
table.row();
table.add(Core.bundle.format("trace.modclient", info.modclient));
table.add(Core.bundle.format("trace.modclient", info.modded));
table.row();
table.add(Core.bundle.format("trace.android", info.android));
table.add(Core.bundle.format("trace.mobile", info.mobile));
table.row();
table.add().pad(5);
table.row();
//disabled until further notice
/*
table.add(Core.bundle.format("trace.totalblocksbroken", info.totalBlocksBroken));
table.row();
table.add(Core.bundle.format("trace.structureblocksbroken", info.structureBlocksBroken));
table.row();
table.add(Core.bundle.format("trace.lastblockbroken", info.lastBlockBroken.localizedName));
table.row();
table.add().pad(5);
table.row();
table.add(Core.bundle.format("trace.totalblocksplaced", info.totalBlocksPlaced));
table.row();
table.add(Core.bundle.format("trace.lastblockplaced", info.lastBlockPlaced.localizedName));
table.row();
cont.add(table);
show();
}*/
}
}

View File

@@ -128,7 +128,7 @@ public class PlayerListFragment extends Fragment{
.touchable(() -> Net.client() ? Touchable.disabled : Touchable.enabled)
.checked(user.isAdmin);
t.addImageButton("icon-zoom-small", "clear-partial", 14 * 2, () -> ui.showError("Currently unimplemented.")/*Call.onAdminRequest(user, AdminAction.trace)*/);
t.addImageButton("icon-zoom-small", "clear-partial", 14 * 2, () -> Call.onAdminRequest(user, AdminAction.trace));
}).padRight(12).size(bs + 10f, bs);
}