예제 #1
0
 // Token: 0x060035F0 RID: 13808 RVA: 0x0016BC20 File Offset: 0x0016A020
 public static void bindOnGUI()
 {
     if (MenuConfigurationControlsUI.binding != 255)
     {
         if (Event.current.type == EventType.KeyDown)
         {
             if (Event.current.keyCode == KeyCode.Backspace)
             {
                 MenuConfigurationControlsUI.updateButton(MenuConfigurationControlsUI.binding);
                 MenuConfigurationControlsUI.cancel();
             }
             else if (Event.current.keyCode != KeyCode.Escape && Event.current.keyCode != KeyCode.Insert)
             {
                 MenuConfigurationControlsUI.bind(Event.current.keyCode);
             }
         }
         else if (Event.current.type == EventType.MouseDown)
         {
             if (Event.current.button == 0)
             {
                 MenuConfigurationControlsUI.bind(KeyCode.Mouse0);
             }
             else if (Event.current.button == 1)
             {
                 MenuConfigurationControlsUI.bind(KeyCode.Mouse1);
             }
             else if (Event.current.button == 2)
             {
                 MenuConfigurationControlsUI.bind(KeyCode.Mouse2);
             }
             else if (Event.current.button == 3)
             {
                 MenuConfigurationControlsUI.bind(KeyCode.Mouse3);
             }
             else if (Event.current.button == 4)
             {
                 MenuConfigurationControlsUI.bind(KeyCode.Mouse4);
             }
             else if (Event.current.button == 5)
             {
                 MenuConfigurationControlsUI.bind(KeyCode.Mouse5);
             }
             else if (Event.current.button == 6)
             {
                 MenuConfigurationControlsUI.bind(KeyCode.Mouse6);
             }
         }
         else if (Event.current.shift)
         {
             MenuConfigurationControlsUI.bind(KeyCode.LeftShift);
         }
     }
 }
 public static void bindOnGUI()
 {
     if (MenuConfigurationControlsUI.binding != 255)
     {
         if (Event.current.type == 4)
         {
             if (Event.current.keyCode == 8)
             {
                 MenuConfigurationControlsUI.updateButton(MenuConfigurationControlsUI.binding);
                 MenuConfigurationControlsUI.cancel();
             }
             else if (Event.current.keyCode != 27 && Event.current.keyCode != 277)
             {
                 MenuConfigurationControlsUI.bind(Event.current.keyCode);
             }
         }
         else if (Event.current.type == null)
         {
             if (Event.current.button == 0)
             {
                 MenuConfigurationControlsUI.bind(323);
             }
             else if (Event.current.button == 1)
             {
                 MenuConfigurationControlsUI.bind(324);
             }
             else if (Event.current.button == 2)
             {
                 MenuConfigurationControlsUI.bind(325);
             }
             else if (Event.current.button == 3)
             {
                 MenuConfigurationControlsUI.bind(326);
             }
             else if (Event.current.button == 4)
             {
                 MenuConfigurationControlsUI.bind(327);
             }
             else if (Event.current.button == 5)
             {
                 MenuConfigurationControlsUI.bind(328);
             }
             else if (Event.current.button == 6)
             {
                 MenuConfigurationControlsUI.bind(329);
             }
         }
         else if (Event.current.shift)
         {
             MenuConfigurationControlsUI.bind(304);
         }
     }
 }
예제 #3
0
        // Token: 0x060035F4 RID: 13812 RVA: 0x0016BE70 File Offset: 0x0016A270
        private static void updateAll()
        {
            byte b = 0;

            while ((int)b < MenuConfigurationControlsUI.layouts.Length)
            {
                byte b2 = 0;
                while ((int)b2 < MenuConfigurationControlsUI.layouts[(int)b].Length)
                {
                    MenuConfigurationControlsUI.updateButton(MenuConfigurationControlsUI.layouts[(int)b][(int)b2]);
                    b2 += 1;
                }
                b += 1;
            }
            MenuConfigurationControlsUI.leaningButton.state      = (int)ControlsSettings.leaning;
            MenuConfigurationControlsUI.sprintingButton.state    = (int)ControlsSettings.sprinting;
            MenuConfigurationControlsUI.proningButton.state      = (int)ControlsSettings.proning;
            MenuConfigurationControlsUI.crouchingButton.state    = (int)ControlsSettings.crouching;
            MenuConfigurationControlsUI.aimingButton.state       = (int)ControlsSettings.aiming;
            MenuConfigurationControlsUI.sensitivityField.state   = ControlsSettings.sensitivity;
            MenuConfigurationControlsUI.invertToggle.state       = ControlsSettings.invert;
            MenuConfigurationControlsUI.invertFlightToggle.state = ControlsSettings.invert;
        }
예제 #4
0
 // Token: 0x060035E4 RID: 13796 RVA: 0x0016BA8C File Offset: 0x00169E8C
 public static void bind(KeyCode key)
 {
     ControlsSettings.bind(MenuConfigurationControlsUI.binding, key);
     MenuConfigurationControlsUI.updateButton(MenuConfigurationControlsUI.binding);
     MenuConfigurationControlsUI.cancel();
 }