fix: toggle names & field name
							parent
							
								
									5693203e77
								
							
						
					
					
						commit
						c1d73de3b5
					
				| 
						 | 
					@ -13,13 +13,13 @@ namespace SkyHook.Editor
 | 
				
			||||||
            SkyHookManager manager = (SkyHookManager)target;
 | 
					            SkyHookManager manager = (SkyHookManager)target;
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            GUI.enabled = false;
 | 
					            GUI.enabled = false;
 | 
				
			||||||
            EditorGUILayout.Toggle("Hook Started", manager.isHookActive);
 | 
					            EditorGUILayout.Toggle("Hook is running", manager.isHookActive);
 | 
				
			||||||
            GUI.enabled = true;
 | 
					            GUI.enabled = true;
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            manager.requireFocus = EditorGUILayout.Toggle("Require Focus", manager.requireFocus);
 | 
					            manager.requireFocus = EditorGUILayout.Toggle("Focus required", manager.requireFocus);
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            GUI.enabled = false;
 | 
					            GUI.enabled = false;
 | 
				
			||||||
            SkyHookManager.isFocused = EditorGUILayout.Toggle("Focus", SkyHookManager.isFocused);
 | 
					            EditorGUILayout.Toggle("Focused", SkyHookManager.IsFocused);
 | 
				
			||||||
            GUI.enabled = true;
 | 
					            GUI.enabled = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,7 +10,7 @@ namespace SkyHook
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        private static SkyHookManager _instance;
 | 
					        private static SkyHookManager _instance;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public static bool isFocused;
 | 
					        public static bool IsFocused;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// Whether or not the event will be received only if the game window is focused.
 | 
					        /// Whether or not the event will be received only if the game window is focused.
 | 
				
			||||||
| 
						 | 
					@ -49,7 +49,7 @@ namespace SkyHook
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        private void HookCallback(SkyHookEvent ev)
 | 
					        private void HookCallback(SkyHookEvent ev)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            if (requireFocus && !isFocused)
 | 
					            if (requireFocus && !IsFocused)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                return;
 | 
					                return;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					@ -124,9 +124,7 @@ namespace SkyHook
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            if (requireFocus)
 | 
					            if (requireFocus)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                #if !UNITY_EDITOR
 | 
					                IsFocused = Application.isFocused;
 | 
				
			||||||
                isFocused = Application.isFocused;
 | 
					 | 
				
			||||||
                #endif
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in New Issue