info popup

This commit is contained in:
J-VdS
2020-09-22 18:40:04 +02:00
parent a418d7e59f
commit 51065b57c4
7 changed files with 27 additions and 29 deletions

View File

@@ -329,7 +329,7 @@ public class DesktopInput extends InputHandler{
table.button(Icon.paste, Styles.clearPartiali, () -> {
ui.schematics.show();
}).tooltip("Schematics").disabled(d -> !state.rules.schematicAllowed);
}).tooltip("Schematics");
table.button(Icon.tree, Styles.clearPartiali, () -> {
ui.research.show();
@@ -387,8 +387,6 @@ public class DesktopInput extends InputHandler{
if(Core.input.keyTap(Binding.schematic_menu) && !Core.scene.hasKeyboard()){
if(ui.schematics.isShown()){
ui.schematics.hide();
}else if(!state.rules.schematicAllowed) {
ui.showInfoToast("@schematic.disabled", 3f);
}else{
ui.schematics.show();
ui.schematics.focusSearchField();
@@ -401,14 +399,10 @@ public class DesktopInput extends InputHandler{
}
if(Core.input.keyRelease(Binding.schematic_select) && !Core.scene.hasKeyboard()){
if(!state.rules.copyAllowed){
ui.showInfoToast("@schematic.copydisabled", 3f);
}else {
lastSchematic = schematics.create(schemX, schemY, rawCursorX, rawCursorY);
useSchematic(lastSchematic);
if (selectRequests.isEmpty()) {
lastSchematic = null;
}
lastSchematic = schematics.create(schemX, schemY, rawCursorX, rawCursorY);
useSchematic(lastSchematic);
if (selectRequests.isEmpty()) {
lastSchematic = null;
}
}