c l e a n u p
This commit is contained in:
@@ -41,9 +41,9 @@ public class AdminsDialog extends FloatingDialog{
|
||||
res.addImageButton(Icon.cancel, () -> {
|
||||
ui.showConfirm("$confirm", "$confirmunadmin", () -> {
|
||||
netServer.admins.unAdminPlayer(info.id);
|
||||
Groups.player.all().each(player -> {
|
||||
if(player != null && player.uuid != null && player.uuid.equals(info.id)){
|
||||
player.isAdmin = false;
|
||||
Groups.player.each(player -> {
|
||||
if(player != null && !player.isLocal() && player.uuid().equals(info.id)){
|
||||
player.admin(false);
|
||||
}
|
||||
});
|
||||
setup();
|
||||
|
||||
@@ -122,7 +122,7 @@ public class DeployDialog extends FloatingDialog{
|
||||
setFilter(TextureFilter.Linear);
|
||||
}}){{
|
||||
float[] time = {0};
|
||||
setColor(Color.gray(0.3f));
|
||||
setColor(Color.grays(0.3f));
|
||||
setScale(1.5f);
|
||||
update(() -> {
|
||||
setOrigin(Align.center);
|
||||
@@ -140,7 +140,7 @@ public class DeployDialog extends FloatingDialog{
|
||||
Stack sub = new Stack();
|
||||
|
||||
if(slot.getZone() != null){
|
||||
sub.add(new Table(f -> f.margin(4f).add(new Image()).color(Color.gray(0.1f)).grow()));
|
||||
sub.add(new Table(f -> f.margin(4f).add(new Image()).color(Color.grays(0.1f)).grow()));
|
||||
|
||||
//sub.add(new Table(f -> f.margin(4f).add(new Image(slot.getZone().preview).setScaling(Scaling.fit)).update(img -> {
|
||||
//TextureRegionDrawable draw = (TextureRegionDrawable)img.getDrawable();
|
||||
|
||||
@@ -24,7 +24,7 @@ public class HostDialog extends FloatingDialog{
|
||||
cont.table(t -> {
|
||||
t.add("$name").padRight(10);
|
||||
t.addField(Core.settings.getString("name"), text -> {
|
||||
player.name = text;
|
||||
player.name(text);
|
||||
Core.settings.put("name", text);
|
||||
Core.settings.save();
|
||||
ui.listfrag.rebuild();
|
||||
@@ -32,12 +32,12 @@ public class HostDialog extends FloatingDialog{
|
||||
|
||||
ImageButton button = t.addImageButton(Tex.whiteui, Styles.clearFulli, 40, () -> {
|
||||
new PaletteDialog().show(color -> {
|
||||
player.color.set(color);
|
||||
player.color().set(color);
|
||||
Core.settings.put("color-0", Color.rgba8888(color));
|
||||
Core.settings.save();
|
||||
});
|
||||
}).size(54f).get();
|
||||
button.update(() -> button.getStyle().imageUpColor = player.color);
|
||||
button.update(() -> button.getStyle().imageUpColor = player.color());
|
||||
}).width(w).height(70f).pad(4).colspan(3);
|
||||
|
||||
cont.row();
|
||||
@@ -67,7 +67,7 @@ public class HostDialog extends FloatingDialog{
|
||||
Time.runTask(5f, () -> {
|
||||
try{
|
||||
net.host(Vars.port);
|
||||
player.isAdmin = true;
|
||||
player.admin(true);
|
||||
|
||||
if(steam){
|
||||
Core.app.post(() -> Core.settings.getBoolOnce("steampublic2", () -> {
|
||||
|
||||
@@ -248,22 +248,22 @@ public class JoinDialog extends FloatingDialog{
|
||||
t.add("$name").padRight(10);
|
||||
if(!steam){
|
||||
t.addField(Core.settings.getString("name"), text -> {
|
||||
player.name = text;
|
||||
player.name(text);
|
||||
Core.settings.put("name", text);
|
||||
Core.settings.save();
|
||||
}).grow().pad(8).get().setMaxLength(maxNameLength);
|
||||
}else{
|
||||
t.add(player.name()).update(l -> l.setColor(player.color)).grow().pad(8);
|
||||
t.add(player.name()).update(l -> l.setColor(player.color())).grow().pad(8);
|
||||
}
|
||||
|
||||
ImageButton button = t.addImageButton(Tex.whiteui, Styles.clearFulli, 40, () -> {
|
||||
new PaletteDialog().show(color -> {
|
||||
player.color.set(color);
|
||||
player.color().set(color);
|
||||
Core.settings.put("color-0", Color.rgba8888(color));
|
||||
Core.settings.save();
|
||||
});
|
||||
}).size(54f).get();
|
||||
button.update(() -> button.getStyle().imageUpColor = player.color);
|
||||
button.update(() -> button.getStyle().imageUpColor = player.color());
|
||||
}).width(w).height(70f).pad(4);
|
||||
cont.row();
|
||||
cont.add(pane).width(w + 38).pad(0);
|
||||
@@ -335,7 +335,7 @@ public class JoinDialog extends FloatingDialog{
|
||||
}
|
||||
|
||||
public void connect(String ip, int port){
|
||||
if(player.name.trim().isEmpty()){
|
||||
if(player.name().trim().isEmpty()){
|
||||
ui.showInfo("$noname");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public class PaletteDialog extends Dialog{
|
||||
cons.get(color);
|
||||
hide();
|
||||
}).size(48).get();
|
||||
button.setChecked(player.color.equals(color));
|
||||
button.setChecked(player.color().equals(color));
|
||||
button.getStyle().imageUpColor = color;
|
||||
|
||||
if(i % 4 == 3){
|
||||
|
||||
Reference in New Issue
Block a user