This commit is contained in:
Anuken
2020-08-24 23:55:19 -04:00
parent 91569596d8
commit 174e4b8632
4 changed files with 15 additions and 12 deletions

View File

@@ -47,6 +47,15 @@ public class DesktopInput extends InputHandler{
@Override
public void buildUI(Group group){
group.fill(t -> {
t.visible(() -> Core.settings.getBool("hints") && !player.dead() && !player.unit().spawnedByCore() && !(Core.settings.getBool("hints") && lastSchematic != null && !selectRequests.isEmpty()));
t.bottom();
t.table(Styles.black6, b -> {
b.defaults().left();
b.label(() -> Core.bundle.format("respawn", Core.keybinds.get(Binding.respawn).key.toString())).style(Styles.outlineLabel);
}).margin(6f);
});
group.fill(t -> {
t.bottom();
t.visible(() -> {
@@ -79,15 +88,6 @@ public class DesktopInput extends InputHandler{
});
}).margin(6f);
});
group.fill(t -> {
t.visible(() -> Core.settings.getBool("hints") && !player.dead() && !player.unit().spawnedByCore());
t.bottom();
t.table(Styles.black6, b -> {
b.defaults().left();
b.label(() -> Core.bundle.format("respawn", Core.keybinds.get(Binding.respawn).key.toString())).style(Styles.outlineLabel);
}).margin(6f);
});
}
@Override
@@ -188,12 +188,12 @@ public class DesktopInput extends InputHandler{
panning = true;
}
if(Math.abs(Core.input.axis(Binding.move_x)) > 0 || Math.abs(Core.input.axis(Binding.move_y)) > 0){
if((Math.abs(Core.input.axis(Binding.move_x)) > 0 || Math.abs(Core.input.axis(Binding.move_y)) > 0) && (!scene.hasField())){
panning = false;
}
//TODO awful UI state checking code
if(((player.dead() || state.isPaused()) && !ui.chatfrag.shown()) && (!(scene.getKeyboardFocus() instanceof TextField) && !scene.hasDialog())){
if(((player.dead() || state.isPaused()) && !ui.chatfrag.shown()) && (!scene.hasField() && !scene.hasDialog())){
if(input.keyDown(Binding.mouse_move)){
panCam = true;
}

View File

@@ -307,6 +307,8 @@ public class LogicBlock extends Block{
}
asm.putConst("@this", this);
asm.putConst("@thisx", x);
asm.putConst("@thisy", y);
executor.load(asm);
}catch(Exception e){