mirror of
https://github.com/GTNewHorizons/WirelessCraftingTerminal.git
synced 2026-11-19 19:50:00 +00:00
Pause terminal item movement when shifting
This commit is contained in:
1 parent
3f65118f1e
commit
25300d4e03
1 file changed
+14
-1
+14
-1
@@ -37,6 +37,7 @@ import appeng.api.config.TerminalFontSize;
|
||||
import appeng.api.config.TerminalStyle;
|
||||
import appeng.api.config.YesNo;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.storage.data.IDisplayRepo;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.api.util.IConfigurableObject;
|
||||
import appeng.client.ActionKey;
|
||||
@@ -88,7 +89,7 @@ public class GuiWirelessCraftingTerminal extends AEBaseGui
|
||||
public static int craftingGridOffsetX = 80;
|
||||
public static int craftingGridOffsetY;
|
||||
private static String memoryText = "";
|
||||
private final ItemRepo repo;
|
||||
private final IDisplayRepo repo;
|
||||
private final int offsetX = 8;
|
||||
private final IConfigManager configSrc;
|
||||
private GuiTabButton craftingStatusBtn;
|
||||
@@ -654,6 +655,18 @@ public class GuiWirelessCraftingTerminal extends AEBaseGui
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleKeyboardInput() {
|
||||
super.handleKeyboardInput();
|
||||
|
||||
// Pause the terminal when holding shift
|
||||
this.repo.setPaused(hasShiftDown());
|
||||
}
|
||||
|
||||
private boolean hasShiftDown() {
|
||||
return Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT);
|
||||
}
|
||||
|
||||
protected boolean isPowered() {
|
||||
return this.repo.hasPower();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user