11using UnityEditor ;
2- #if UNITY_2019_1_OR_NEWER
3- using UnityEditor . ShortcutManagement ;
4- using UnityEngine ;
5- #endif
2+
63
74namespace litefeel . AlignTools
85{
96 public static class AlignToolsMenu
107 {
11- #if UNITY_2019_1_OR_NEWER
12- private const string KeyboardMenuPath = "Align Tools/Adjust Position By Keyboard" ;
13- private const string WindowMenuPath = "Window/LiteFeel/Align Tools" ;
14- #else
158 private const string KeyboardMenuPath = "Window/LiteFeel/Align Tools/Adjust Position By Keyboard %#K" ;
169 private const string WindowMenuPath = "Window/LiteFeel/Align Tools/Align Tools" ;
17- #endif
10+
1811 // Creation of window
1912 [ MenuItem ( WindowMenuPath ) ]
2013 private static void AlignToolsWindows ( )
@@ -24,14 +17,6 @@ private static void AlignToolsWindows()
2417 window . autoRepaintOnSceneChange = true ;
2518 }
2619
27- #if UNITY_2019_1_OR_NEWER
28- [ ClutchShortcut ( KeyboardMenuPath , KeyCode . K , ShortcutModifiers . Action | ShortcutModifiers . Shift ) ]
29- private static void ToggleKeyboard ( ShortcutArguments arg )
30- {
31- if ( arg . stage == ShortcutStage . Begin )
32- Settings . AdjustPositionByKeyboard = ! Settings . AdjustPositionByKeyboard ;
33- }
34- #else
3520 [ MenuItem ( KeyboardMenuPath , true ) ]
3621 private static bool VaildToggleKeyboard ( )
3722 {
@@ -43,7 +28,6 @@ private static void ToggleKeyboard()
4328 {
4429 Settings . AdjustPositionByKeyboard = ! Menu . GetChecked ( KeyboardMenuPath ) ;
4530 }
46- #endif
4731 }
4832}
4933
0 commit comments