// Token: 0x060013CD RID: 5069 RVA: 0x000720C4 File Offset: 0x000702C4 private void ResolveMultipleAssignment(UserInputMap map) { foreach (UserInputMap userInputMap in this._keyMapping.Values) { if (userInputMap != map && userInputMap.Channel != null && userInputMap.Channel.ChannelType == map.Channel.ChannelType && map.Assignment == userInputMap.Assignment) { userInputMap.Channel = null; break; } } }
// Token: 0x060013C6 RID: 5062 RVA: 0x000719C0 File Offset: 0x0006FBC0 public bool ListenForNewKeyAssignment(UserInputMap map) { if (Event.current.keyCode == KeyCode.Escape) { this.IsSettingKeymap = false; return(true); } if (Event.current.keyCode != KeyCode.None) { map.Channel = new KeyInputChannel(Event.current.keyCode); } else if (Event.current.shift) { if (Input.GetKey(KeyCode.LeftShift)) { map.Channel = new KeyInputChannel(KeyCode.LeftShift); } if (Input.GetKey(KeyCode.RightShift)) { map.Channel = new KeyInputChannel(KeyCode.RightShift); } } else if (Input.GetMouseButtonDown(0) || Input.GetMouseButtonDown(1) || Input.GetMouseButtonDown(2) || Input.GetMouseButtonDown(3) || Input.GetMouseButtonDown(4)) { map.Channel = new MouseInputChannel(Event.current.button); } else if (Mathf.Abs(Input.GetAxisRaw("Mouse ScrollWheel")) > 0.1f) { map.Channel = new AxisInputChannel("Mouse ScrollWheel", 0.1f, (Input.GetAxisRaw("Mouse ScrollWheel") <= 0f) ? AxisInputChannel.AxisReadingMethod.NegativeOnly : AxisInputChannel.AxisReadingMethod.PositiveOnly); } else if (Mathf.Abs(Input.GetAxisRaw("LS X")) > 0.1f) { map.Channel = new AxisInputChannel("LS X", 0.1f, (Input.GetAxisRaw("LS X") <= 0f) ? AxisInputChannel.AxisReadingMethod.NegativeOnly : AxisInputChannel.AxisReadingMethod.PositiveOnly); } else if (Mathf.Abs(Input.GetAxisRaw("LS Y")) > 0.1f) { map.Channel = new AxisInputChannel("LS Y", 0.1f, (Input.GetAxisRaw("LS Y") <= 0f) ? AxisInputChannel.AxisReadingMethod.NegativeOnly : AxisInputChannel.AxisReadingMethod.PositiveOnly); } else if (Mathf.Abs(Input.GetAxisRaw("RS X")) > 0.1f) { map.Channel = new AxisInputChannel("RS X", 0.1f, (Input.GetAxisRaw("RS X") <= 0f) ? AxisInputChannel.AxisReadingMethod.NegativeOnly : AxisInputChannel.AxisReadingMethod.PositiveOnly); } else if (Mathf.Abs(Input.GetAxisRaw("RS Y")) > 0.1f) { map.Channel = new AxisInputChannel("RS Y", 0.1f, (Input.GetAxisRaw("RS Y") <= 0f) ? AxisInputChannel.AxisReadingMethod.NegativeOnly : AxisInputChannel.AxisReadingMethod.PositiveOnly); } else if (Mathf.Abs(Input.GetAxisRaw("DPad X")) > 0.1f) { map.Channel = new AxisInputChannel("DPad X", 0.1f, (Input.GetAxisRaw("DPad X") <= 0f) ? AxisInputChannel.AxisReadingMethod.NegativeOnly : AxisInputChannel.AxisReadingMethod.PositiveOnly); } else if (Mathf.Abs(Input.GetAxisRaw("DPad Y")) > 0.1f) { map.Channel = new AxisInputChannel("DPad Y", 0.1f, (Input.GetAxisRaw("DPad Y") <= 0f) ? AxisInputChannel.AxisReadingMethod.NegativeOnly : AxisInputChannel.AxisReadingMethod.PositiveOnly); } else if (Input.GetAxisRaw("LT") > 0.1f) { map.Channel = new AxisInputChannel("LT", 0.1f); } else if (Input.GetAxisRaw("RT") > 0.1f) { map.Channel = new AxisInputChannel("RT", 0.1f); } else if (Input.GetButton("A")) { map.Channel = new ButtonInputChannel("A"); } else if (Input.GetButton("B")) { map.Channel = new ButtonInputChannel("B"); } else if (Input.GetButton("X")) { map.Channel = new ButtonInputChannel("X"); } else if (Input.GetButton("Y")) { map.Channel = new ButtonInputChannel("Y"); } else if (Input.GetButton("LB")) { map.Channel = new ButtonInputChannel("LB"); } else if (Input.GetButton("RB")) { map.Channel = new ButtonInputChannel("RB"); } else if (Input.GetButton("Start")) { map.Channel = new ButtonInputChannel("Start"); } else { if (!Input.GetButton("Back")) { this.IsSettingKeymap = true; return(false); } map.Channel = new ButtonInputChannel("Back"); } global::EventHandler.Global.Fire(new GlobalEvents.InputAssignment()); Event.current.Use(); this.ResolveMultipleAssignment(map); this.WriteAllKeyMappings(); this.IsSettingKeymap = false; return(true); }