more delectable selection pane (#6318)

This commit is contained in:
JrTRinny 2021-11-09 06:12:23 +07:00 committed by GitHub
parent af7c11c4b7
commit c96b723aaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 2 deletions

View file

@ -95,7 +95,7 @@ public class WaveInfoDialog extends BaseDialog{
dialog.hide();
}).marginLeft(12f).disabled(b -> Core.app.getClipboardText() == null || Core.app.getClipboardText().isEmpty()).row();
t.button("@settings.reset", Icon.upload, style, () -> ui.showConfirm("@confirm", "@settings.clear.confirm", () -> {
t.button("@settings.reset", Icon.upload, style, () -> ui.showConfirm("@confirm", "@settings.clear.confirm", () -> {
groups = JsonIO.copy(waves.get());
buildGroups();
dialog.hide();

View file

@ -252,6 +252,7 @@ public class MassDriver extends Block{
@Override
public boolean onConfigureTileTapped(Building other){
if(this == other){
if(link == -1) deselect();
configure(-1);
return false;
}

View file

@ -432,6 +432,7 @@ public class PayloadMassDriver extends PayloadBlock{
@Override
public boolean onConfigureTileTapped(Building other){
if(this == other){
if(link == -1) deselect();
configure(-1);
return false;
}

View file

@ -53,7 +53,6 @@ public class CoreBlock extends StorageBlock{
//support everything
envEnabled = Env.any;
drawDisabled = false;
replaceable = false;
rebuildable = false;
}

View file

@ -118,6 +118,16 @@ public class CommandCenter extends Block{
table.label(() -> team.data().command.localized()).style(Styles.outlineLabel).center().growX().get().setAlignment(Align.center);
}
@Override
public boolean onConfigureTileTapped(Building other){
if(this == other){
deselect();
return false;
}
return true;
}
@Override
public void write(Writes write){
super.write(write);