Example #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);
         }
     }
 }
Example #3
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();
 }
Example #4
0
 private static void cancel()
 {
     MenuConfigurationControlsUI.cancel();
     MenuConfigurationControls.binding = byte.MaxValue;
 }