// Token: 0x06003901 RID: 14593 RVA: 0x000E7788 File Offset: 0x000E5988
 public void Update()
 {
     if (!this.editing)
     {
         return;
     }
     if (this.exit < 2)
     {
         this.exit++;
         return;
     }
     if (Input.GetKeyDown(KeyCode.Escape) || (this.WasPressed(XboxControllerInput.Button.Start) && this.currentKeys.Count > 0))
     {
         this.editing = false;
         SuspensionManager.ResumeAll();
         this.SetKeys(this.currentKeys.ToArray());
         PlayerInputRebinding.WriteControllerRebindSettings();
         PlayerInput.Instance.RefreshControlScheme();
         this.owner.SetFakeTooltip(this.owner.DefaultTooltip);
         return;
     }
     PlayerInputRebinding.ControllerButton?pressedButtonAsBind = this.GetPressedButtonAsBind();
     if (pressedButtonAsBind != null && !this.currentKeys.Contains(pressedButtonAsBind.Value))
     {
         this.currentKeys.Add(pressedButtonAsBind.Value);
         this.UpdateMessageBox();
     }
     foreach (XboxControllerInput.Button button in this.allButtons)
     {
         this.buttonsPressed[(int)button] = XboxControllerInput.GetButton(button, -1);
     }
 }
Example #2
0
    // Token: 0x06001BF4 RID: 7156 RVA: 0x000874E8 File Offset: 0x000856E8
    public void OnMenuItemPressed()
    {
        InventoryAbilityItem component = this.NavigationManager.CurrentMenuItem.GetComponent <InventoryAbilityItem>();

        if (component && !component.HasAbility)
        {
            if (this.PressUngainedAbilityOptionSound)
            {
                Sound.Play(this.PressUngainedAbilityOptionSound.GetSound(null), base.transform.position, null);
            }
            return;
        }
        InventoryItemHelpText component2 = this.NavigationManager.CurrentMenuItem.GetComponent <InventoryItemHelpText>();

        if (component2)
        {
            SuspensionManager.SuspendAll();
            MessageBox messageBox = UI.MessageController.ShowMessageBoxB(this.HelpMessageBox, component2.HelpMessage, Vector3.zero, float.PositiveInfinity);
            if (messageBox)
            {
                messageBox.SetAvatar(component2.Avatar);
                messageBox.OnMessageScreenHide += new Action(this.OnMessageScreenHide);
            }
            else
            {
                SuspensionManager.ResumeAll();
            }
            this.m_currentCloseMessageSound = ((!component) ? this.CloseStatisticsMessageSound : this.CloseAbilityMessageSound);
            if (component && this.PressAbilityOptionSound)
            {
                Sound.Play(this.PressAbilityOptionSound.GetSound(null), base.transform.position, null);
            }
        }
    }
Example #3
0
 // Token: 0x06003441 RID: 13377 RVA: 0x00029868 File Offset: 0x00027A68
 public void ResumeGameplayForUI()
 {
     if (this.GameplaySuspendedForUI)
     {
         SuspensionManager.ResumeAll();
         this.GameplaySuspendedForUI = false;
     }
 }
Example #4
0
 // Token: 0x06001BF5 RID: 7157 RVA: 0x0008761C File Offset: 0x0008581C
 public void OnMessageScreenHide()
 {
     SuspensionManager.ResumeAll();
     if (this.m_currentCloseMessageSound && base.transform)
     {
         Sound.Play(this.m_currentCloseMessageSound.GetSound(null), base.transform.position, null);
     }
 }
 // Token: 0x0600389A RID: 14490 RVA: 0x000E70B8 File Offset: 0x000E52B8
 public void Update()
 {
     if (!this.editing)
     {
         return;
     }
     if (this.exit < 2)
     {
         this.exit++;
         return;
     }
     if (Input.GetKeyDown(KeyCode.Return) && this.currentKeys.Count > 0)
     {
         this.editing = false;
         SuspensionManager.ResumeAll();
         this.SetKeys(this.currentKeys.ToArray());
         PlayerInputRebinding.WriteKeyRebindSettings();
         PlayerInput.Instance.RefreshControlScheme();
         this.owner.SetFakeTooltip(this.owner.DefaultTooltip);
         return;
     }
     if (Input.GetKeyDown(KeyCode.Backspace))
     {
         if (this.currentKeys.Count > 0)
         {
             this.currentKeys.RemoveAt(this.currentKeys.Count - 1);
             this.UpdateMessageBox();
             return;
         }
     }
     else if (Input.anyKeyDown)
     {
         foreach (object obj in Enum.GetValues(typeof(KeyCode)))
         {
             KeyCode keyCode3 = (KeyCode)obj;
             if (Input.GetKeyDown(keyCode3) && !this.currentKeys.Contains(keyCode3))
             {
                 this.currentKeys.Add(keyCode3);
                 this.UpdateMessageBox();
             }
         }
     }
 }