aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/util/input
diff options
context:
space:
mode:
authorJordan Byrne <draknyte1@hotmail.com>2018-01-29 18:45:40 +1000
committerJordan Byrne <draknyte1@hotmail.com>2018-01-29 18:45:40 +1000
commit0828168a736692402bd621b984c2d35590ed9730 (patch)
treefb9da5ea4836544b6278364db449ed5cebf52696 /src/Java/gtPlusPlus/core/util/input
parent33a1703896cbc37b9986c71038e20c659edb7814 (diff)
downloadGT5-Unofficial-0828168a736692402bd621b984c2d35590ed9730.tar.gz
GT5-Unofficial-0828168a736692402bd621b984c2d35590ed9730.tar.bz2
GT5-Unofficial-0828168a736692402bd621b984c2d35590ed9730.zip
+ Added Trinium Titanium Cable/wires.
+ Redid material components to better use GT texture assets. % Gave all 32 ore types new TextureSets. % Doubled capacity of all fluid pipes. % Moved Item/Block creation from init() to preInit(). $ Fixed Sludge fluid texture. $ Moved Darkworld from being a child mod into it's own mod, Renamed to Toxic Everglades. $ Bundled SegmentHelper.java, for future development ease.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util/input')
-rw-r--r--src/Java/gtPlusPlus/core/util/input/KeyboardUtils.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/core/util/input/KeyboardUtils.java b/src/Java/gtPlusPlus/core/util/input/KeyboardUtils.java
new file mode 100644
index 0000000000..3b5dc3b5d8
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/util/input/KeyboardUtils.java
@@ -0,0 +1,23 @@
+package gtPlusPlus.core.util.input;
+
+import org.lwjgl.input.Keyboard;
+
+import net.minecraft.client.Minecraft;
+
+public class KeyboardUtils {
+
+ public static boolean isCtrlKeyDown(){
+ // prioritize CONTROL, but allow OPTION as well on Mac (note: GuiScreen's isCtrlKeyDown only checks for the OPTION key on Mac)
+ boolean isCtrlKeyDown = Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL);
+ if (!isCtrlKeyDown && Minecraft.isRunningOnMac)
+ isCtrlKeyDown = Keyboard.isKeyDown(Keyboard.KEY_LMETA) || Keyboard.isKeyDown(Keyboard.KEY_RMETA);
+
+ return isCtrlKeyDown;
+ }
+
+ public static boolean isShiftKeyDown(){
+ return Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT);
+
+ }
+
+}