// Token: 0x06000232 RID: 562 RVA: 0x000185DC File Offset: 0x000167DC public static bool IsModifierActive(UIKeyBinding.Modifier modifier) { if (modifier == UIKeyBinding.Modifier.Any) { return(true); } if (modifier == UIKeyBinding.Modifier.Alt) { if (UICamera.GetKey(KeyCode.LeftAlt) || UICamera.GetKey(KeyCode.RightAlt)) { return(true); } } else if (modifier == UIKeyBinding.Modifier.Ctrl) { if (UICamera.GetKey(KeyCode.LeftControl) || UICamera.GetKey(KeyCode.RightControl)) { return(true); } } else if (modifier == UIKeyBinding.Modifier.Shift) { if (UICamera.GetKey(KeyCode.LeftShift) || UICamera.GetKey(KeyCode.RightShift)) { return(true); } } else if (modifier == UIKeyBinding.Modifier.None) { return(!UICamera.GetKey(KeyCode.LeftAlt) && !UICamera.GetKey(KeyCode.RightAlt) && !UICamera.GetKey(KeyCode.LeftControl) && !UICamera.GetKey(KeyCode.RightControl) && !UICamera.GetKey(KeyCode.LeftShift) && !UICamera.GetKey(KeyCode.RightShift)); } return(false); }
protected virtual bool IsModifierActive() { if (modifier == Modifier.Any) { return(true); } if (modifier == Modifier.Alt) { if (UICamera.GetKey(308) || UICamera.GetKey(307)) { return(true); } } else if (modifier == Modifier.Control) { if (UICamera.GetKey(306) || UICamera.GetKey(305)) { return(true); } } else if (modifier == Modifier.Shift) { if (UICamera.GetKey(304) || UICamera.GetKey(303)) { return(true); } } else if (modifier == Modifier.None) { return(!UICamera.GetKey(308) && !UICamera.GetKey(307) && !UICamera.GetKey(306) && !UICamera.GetKey(305) && !UICamera.GetKey(304) && !UICamera.GetKey(303)); } return(false); }
protected virtual bool IsModifierActive() { if (this.modifier == UIKeyBinding.Modifier.Any) { return(true); } if (this.modifier == UIKeyBinding.Modifier.Alt) { if (UICamera.GetKey(KeyCode.LeftAlt) || UICamera.GetKey(KeyCode.RightAlt)) { return(true); } } else if (this.modifier == UIKeyBinding.Modifier.Control) { if (UICamera.GetKey(KeyCode.LeftControl) || UICamera.GetKey(KeyCode.RightControl)) { return(true); } } else if (this.modifier == UIKeyBinding.Modifier.Shift) { if (UICamera.GetKey(KeyCode.LeftShift) || UICamera.GetKey(KeyCode.RightShift)) { return(true); } } else if (this.modifier == UIKeyBinding.Modifier.None) { return(!UICamera.GetKey(KeyCode.LeftAlt) && !UICamera.GetKey(KeyCode.RightAlt) && !UICamera.GetKey(KeyCode.LeftControl) && !UICamera.GetKey(KeyCode.RightControl) && !UICamera.GetKey(KeyCode.LeftShift) && !UICamera.GetKey(KeyCode.RightShift)); } return(false); }
/// <summary> /// Convenience function that checks whether the required modifier key is active. /// </summary> protected virtual bool IsModifierActive () { if (modifier == Modifier.Any) return true; if (modifier == Modifier.Alt) { if (UICamera.GetKey(KeyCode.LeftAlt) || UICamera.GetKey(KeyCode.RightAlt)) return true; } else if (modifier == Modifier.Control) { if (UICamera.GetKey(KeyCode.LeftControl) || UICamera.GetKey(KeyCode.RightControl)) return true; } else if (modifier == Modifier.Shift) { if (UICamera.GetKey(KeyCode.LeftShift) || UICamera.GetKey(KeyCode.RightShift)) return true; } else if (modifier == Modifier.None) return !UICamera.GetKey(KeyCode.LeftAlt) && !UICamera.GetKey(KeyCode.RightAlt) && !UICamera.GetKey(KeyCode.LeftControl) && !UICamera.GetKey(KeyCode.RightControl) && !UICamera.GetKey(KeyCode.LeftShift) && !UICamera.GetKey(KeyCode.RightShift); return false; }
/// <summary> /// React to any additional keys, such as Tab. /// </summary> public virtual void OnKey(KeyCode key) { if (key == KeyCode.Tab) { GameObject go = onTab; if (go == null) { if (UICamera.GetKey(KeyCode.LeftShift) || UICamera.GetKey(KeyCode.RightShift)) { go = GetLeft(); if (go == null) { go = GetUp(); } if (go == null) { go = GetDown(); } if (go == null) { go = GetRight(); } } else { go = GetRight(); if (go == null) { go = GetDown(); } if (go == null) { go = GetUp(); } if (go == null) { go = GetLeft(); } } } if (go != null) { UICamera.selectedObject = go; } } }
public virtual void OnKey(KeyCode key) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Invalid comparison between Unknown and I4 if ((int)key == 9) { GameObject val = onTab; if (val == null) { if (UICamera.GetKey(304) || UICamera.GetKey(303)) { val = GetLeft(); if (val == null) { val = GetUp(); } if (val == null) { val = GetDown(); } if (val == null) { val = GetRight(); } } else { val = GetRight(); if (val == null) { val = GetDown(); } if (val == null) { val = GetUp(); } if (val == null) { val = GetLeft(); } } } if (val != null) { UICamera.selectedObject = val; } } }
// Token: 0x06000239 RID: 569 RVA: 0x00018904 File Offset: 0x00016B04 public static UIKeyBinding.Modifier GetActiveModifier() { UIKeyBinding.Modifier result = UIKeyBinding.Modifier.None; if (UICamera.GetKey(KeyCode.LeftAlt) || UICamera.GetKey(KeyCode.RightAlt)) { result = UIKeyBinding.Modifier.Alt; } else if (UICamera.GetKey(KeyCode.LeftShift) || UICamera.GetKey(KeyCode.RightShift)) { result = UIKeyBinding.Modifier.Shift; } else if (UICamera.GetKey(KeyCode.LeftControl) || UICamera.GetKey(KeyCode.RightControl)) { result = UIKeyBinding.Modifier.Ctrl; } return(result); }
public virtual void OnKey(KeyCode key) { if (key == KeyCode.Tab) { GameObject gameObject = this.onTab; if (gameObject == (UnityEngine.Object)null) { if (UICamera.GetKey(KeyCode.LeftShift) || UICamera.GetKey(KeyCode.RightShift)) { gameObject = this.GetLeft(); if (gameObject == (UnityEngine.Object)null) { gameObject = this.GetUp(); } if (gameObject == (UnityEngine.Object)null) { gameObject = this.GetDown(); } if (gameObject == (UnityEngine.Object)null) { gameObject = this.GetRight(); } } else { gameObject = this.GetRight(); if (gameObject == (UnityEngine.Object)null) { gameObject = this.GetDown(); } if (gameObject == (UnityEngine.Object)null) { gameObject = this.GetUp(); } if (gameObject == (UnityEngine.Object)null) { gameObject = this.GetLeft(); } } } if (gameObject != (UnityEngine.Object)null) { UICamera.selectedObject = gameObject; } } }
/// <summary> /// Get the currently active key modifier, if any. /// </summary> static public Modifier GetActiveModifier() { var mod = Modifier.None; if (UICamera.GetKey(KeyCode.LeftAlt) || UICamera.GetKey(KeyCode.RightAlt)) { mod = Modifier.Alt; } else if (UICamera.GetKey(KeyCode.LeftShift) || UICamera.GetKey(KeyCode.RightShift)) { mod = Modifier.Shift; } else if (UICamera.GetKey(KeyCode.LeftControl) || UICamera.GetKey(KeyCode.RightControl)) { mod = Modifier.Ctrl; } return(mod); }
public virtual void OnKey(KeyCode key) { if (UIPopupList.isOpen) { return; } if (UIKeyNavigation.mLastFrame == Time.frameCount) { return; } UIKeyNavigation.mLastFrame = Time.frameCount; if (key == KeyCode.Tab) { GameObject gameObject = this.onTab; if (gameObject == null) { if (UICamera.GetKey(KeyCode.LeftShift) || UICamera.GetKey(KeyCode.RightShift)) { gameObject = this.GetLeft(); if (gameObject == null) { gameObject = this.GetUp(); } if (gameObject == null) { gameObject = this.GetDown(); } if (gameObject == null) { gameObject = this.GetRight(); } } else { gameObject = this.GetRight(); if (gameObject == null) { gameObject = this.GetDown(); } if (gameObject == null) { gameObject = this.GetUp(); } if (gameObject == null) { gameObject = this.GetLeft(); } } } if (gameObject != null) { UICamera.currentScheme = UICamera.ControlScheme.Controller; UICamera.hoveredObject = gameObject; UIInput component = gameObject.GetComponent <UIInput>(); if (component != null) { component.isSelected = true; } } } }
/// <summary> /// React to any additional keys, such as Tab. /// </summary> public virtual void OnKey(KeyCode key) { if (UIPopupList.isOpen) { return; } if (mLastFrame == Time.frameCount) { return; } mLastFrame = Time.frameCount; if (key == KeyCode.Tab) { GameObject go = onTab; if (go == null) { if (UICamera.GetKey(KeyCode.LeftShift) || UICamera.GetKey(KeyCode.RightShift)) { go = GetLeft(); if (go == null) { go = GetUp(); } if (go == null) { go = GetDown(); } if (go == null) { go = GetRight(); } } else { go = GetRight(); if (go == null) { go = GetDown(); } if (go == null) { go = GetUp(); } if (go == null) { go = GetLeft(); } } } if (go != null) { UICamera.currentScheme = UICamera.ControlScheme.Controller; UICamera.hoveredObject = go; UIInput inp = go.GetComponent <UIInput>(); if (inp != null) { inp.isSelected = true; } } } }