private void OnEnable() { this.updateMode = Remapping.UpdateMode.ButtonSelectMode; this.selectedControllerType = (ControllerType)2; this.selectedControllerId = 0; this.settingOrDeleteWindow.SetActive(false); if (!ReInput.get_isReady()) { return; } ReInput.add_ControllerConnectedEvent(new Action <ControllerStatusChangedEventArgs>(this.OnControllerChanged)); ReInput.add_ControllerDisconnectedEvent(new Action <ControllerStatusChangedEventArgs>(this.OnControllerChanged)); ((UnityEventBase)this.settingButton.get_onClick()).RemoveAllListeners(); ((UnityEventBase)this.deleteButton.get_onClick()).RemoveAllListeners(); ((UnityEventBase)this.returnButton.get_onClick()).RemoveAllListeners(); // ISSUE: method pointer ((UnityEvent)this.settingButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnEnable\u003Em__0))); // ISSUE: method pointer ((UnityEvent)this.deleteButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnEnable\u003Em__1))); // ISSUE: method pointer ((UnityEvent)this.returnButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnEnable\u003Em__2))); this.SetJoystickActiv(); this.SetControllerToDropdown(); this.LoadControllerSetting(); this.InitializeUI(); }
private void OnInputFieldClicked(int _buttonIndex) { if (_buttonIndex < 0 || this.rows.Count <= _buttonIndex || this.controller == null) { return; } ((Selectable)this.controllerSelectDropDown).set_interactable(false); this.row = this.rows[_buttonIndex]; this.updateMode = Remapping.UpdateMode.SettingOrDelete; this.messageText.set_text(string.Empty); this.settingOrDeleteWindow.SetActive(true); }
private void UpdateInputCheckMode() { ControllerPollingInfo _pollingInfo = ((ReInput.ControllerHelper.PollingHelper)ReInput.get_controllers().polling).PollControllerForFirstElementDown(this.selectedControllerType, this.selectedControllerId); if (!((ControllerPollingInfo) ref _pollingInfo).get_success() || ((ControllerPollingInfo) ref _pollingInfo).get_elementType() != 1) { return; } InputAction action = this.row.action; ActionElementMap _actionElementMap = !this.controllerMap.ContainsAction(action.get_id()) ? (ActionElementMap)null : this.controllerMap.GetElementMapsWithAction(action.get_id())[0]; ElementAssignment elementAssignment = this.ToElementAssignment(_pollingInfo, (ModifierKeyFlags)0, this.row.actionRange, action.get_id(), _actionElementMap); ElementAssignmentConflictCheck _conflictCheck = (ElementAssignmentConflictCheck)null; if (this.CreateConflictCheck(elementAssignment, out _conflictCheck, _actionElementMap) && !((ReInput.ControllerHelper.ConflictCheckingHelper)ReInput.get_controllers().conflictChecking).DoesElementAssignmentConflict(_conflictCheck)) { this.controllerMap.ReplaceOrCreateElementMap(elementAssignment); } this.row = (Remapping.Row)null; this.updateMode = Remapping.UpdateMode.ButtonSelectMode; ((Selectable)this.controllerSelectDropDown).set_interactable(true); this.RedrawUI(); }
private void CloseWindow(Remapping.UpdateMode _updateMode) { this.updateMode = _updateMode; this.settingOrDeleteWindow.SetActive(false); }