In-game editor UI improvements

This commit is contained in:
Anuken
2024-10-03 14:44:33 -04:00
parent 24daa1e933
commit 15ca672179
15 changed files with 230 additions and 24 deletions

View File

@@ -265,11 +265,11 @@ public class MobileInput extends InputHandler implements GestureListener{
}).name("confirmplace");
}
boolean showCancel(){
return !player.dead() && (player.unit().isBuilding() || block != null || mode == breaking || !selectPlans.isEmpty()) && !hasSchem();
public boolean showCancel(){
return !player.dead() && (player.unit().isBuilding() || block != null || mode == breaking || !selectPlans.isEmpty()) && !hasSchematic();
}
boolean hasSchem(){
public boolean hasSchematic(){
return lastSchematic != null && !selectPlans.isEmpty();
}
@@ -290,7 +290,7 @@ public class MobileInput extends InputHandler implements GestureListener{
});
group.fill(t -> {
t.visible(() -> !showCancel() && block == null && !hasSchem());
t.visible(() -> !showCancel() && block == null && !hasSchematic() && !state.rules.editor);
t.bottom().left();
t.button("@command.queue", Icon.rightOpen, Styles.clearTogglet, () -> {
@@ -310,7 +310,7 @@ public class MobileInput extends InputHandler implements GestureListener{
});
group.fill(t -> {
t.visible(this::hasSchem);
t.visible(this::hasSchematic);
t.bottom().left();
t.table(Tex.pane, b -> {
b.defaults().size(50f);
@@ -759,7 +759,7 @@ public class MobileInput extends InputHandler implements GestureListener{
payloadTarget = null;
}
if(locked || block != null || scene.hasField() || hasSchem() || selectPlans.size > 0){
if(locked || block != null || scene.hasField() || hasSchematic() || selectPlans.size > 0){
commandMode = false;
}