|
|
@ -66,8 +66,11 @@ public class ShortcutManager { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public boolean activateShortcut(KeyInputEvent kie) { |
|
|
|
public boolean activateShortcut(KeyInputEvent kie) { |
|
|
|
currentShortcut = getActivableShortcut(kie); |
|
|
|
ShortcutTool newShortcut = getActivableShortcut(kie); |
|
|
|
return isActive(); |
|
|
|
if(newShortcut != null){ |
|
|
|
|
|
|
|
currentShortcut = newShortcut; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return newShortcut != null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void doKeyPressed(KeyInputEvent kie) { |
|
|
|
public void doKeyPressed(KeyInputEvent kie) { |
|
|
@ -182,13 +185,13 @@ public class ShortcutManager { |
|
|
|
|
|
|
|
|
|
|
|
public static boolean checkAxisKey(KeyInputEvent kie, Vector3f axisStore) { |
|
|
|
public static boolean checkAxisKey(KeyInputEvent kie, Vector3f axisStore) { |
|
|
|
if (kie.getKeyCode() == KeyInput.KEY_X) { |
|
|
|
if (kie.getKeyCode() == KeyInput.KEY_X) { |
|
|
|
axisStore = Vector3f.UNIT_X; |
|
|
|
axisStore.set(Vector3f.UNIT_X); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} else if (kie.getKeyCode() == KeyInput.KEY_Y) { |
|
|
|
} else if (kie.getKeyCode() == KeyInput.KEY_Y) { |
|
|
|
axisStore = Vector3f.UNIT_Y; |
|
|
|
axisStore.set(Vector3f.UNIT_Y); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} else if (kie.getKeyCode() == KeyInput.KEY_Z) { |
|
|
|
} else if (kie.getKeyCode() == KeyInput.KEY_Z) { |
|
|
|
axisStore = Vector3f.UNIT_Z; |
|
|
|
axisStore.set(Vector3f.UNIT_Z); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
return false; |
|
|
|
return false; |
|
|
|