Ejemplo n.º 1
0
 private void Update()
 {
     if (MenuConfigurationControls.binding != 255)
     {
         if (Event.current.type == 4)
         {
             if (Event.current.keyCode == 8 || Event.current.keyCode == 27)
             {
                 MenuConfigurationControls.cancel();
             }
             else
             {
                 MenuConfigurationControls.bind(Event.current.keyCode);
             }
         }
         else if (Event.current.type == null)
         {
             if (Event.current.button == 0)
             {
                 MenuConfigurationControls.bind(323);
             }
             else if (Event.current.button == 1)
             {
                 MenuConfigurationControls.bind(324);
             }
             else if (Event.current.button == 2)
             {
                 MenuConfigurationControls.bind(325);
             }
             else if (Event.current.button == 3)
             {
                 MenuConfigurationControls.bind(326);
             }
             else if (Event.current.button == 4)
             {
                 MenuConfigurationControls.bind(327);
             }
             else if (Event.current.button == 5)
             {
                 MenuConfigurationControls.bind(328);
             }
             else if (Event.current.button == 6)
             {
                 MenuConfigurationControls.bind(329);
             }
         }
         else if (Event.current.shift)
         {
             MenuConfigurationControls.bind(304);
         }
     }
 }
Ejemplo n.º 2
0
 // Token: 0x06002A2A RID: 10794 RVA: 0x001068B8 File Offset: 0x00104CB8
 private void Update()
 {
     if (MenuConfigurationControls.binding != 255)
     {
         if (Event.current.type == EventType.KeyDown)
         {
             if (Event.current.keyCode == KeyCode.Backspace || Event.current.keyCode == KeyCode.Escape)
             {
                 MenuConfigurationControls.cancel();
             }
             else
             {
                 MenuConfigurationControls.bind(Event.current.keyCode);
             }
         }
         else if (Event.current.type == EventType.MouseDown)
         {
             if (Event.current.button == 0)
             {
                 MenuConfigurationControls.bind(KeyCode.Mouse0);
             }
             else if (Event.current.button == 1)
             {
                 MenuConfigurationControls.bind(KeyCode.Mouse1);
             }
             else if (Event.current.button == 2)
             {
                 MenuConfigurationControls.bind(KeyCode.Mouse2);
             }
             else if (Event.current.button == 3)
             {
                 MenuConfigurationControls.bind(KeyCode.Mouse3);
             }
             else if (Event.current.button == 4)
             {
                 MenuConfigurationControls.bind(KeyCode.Mouse4);
             }
             else if (Event.current.button == 5)
             {
                 MenuConfigurationControls.bind(KeyCode.Mouse5);
             }
             else if (Event.current.button == 6)
             {
                 MenuConfigurationControls.bind(KeyCode.Mouse6);
             }
         }
         else if (Event.current.shift)
         {
             MenuConfigurationControls.bind(KeyCode.LeftShift);
         }
     }
 }