void OnDialogModeChanged(SetDialogModeAction.DialogMode obj) { if (obj == SetDialogModeAction.DialogMode.Help) { m_DeltaDnaRequest.TrackButtonEvent(m_DeltaDnaRequest.userId, "HelpModeEnter"); } }
void Awake() { #if UNITY_ANDROID || UNITY_IOS m_InputActionAsset["Place Joystick Action"].performed += OnPlaceJoystick; OrphanUIController.onBeginDrag += OnBeginDrag; OrphanUIController.onDrag += OnDrag; OrphanUIController.onEndDrag += OnCancel; #else m_InputActionAsset["Walk Mode Action"].started += OnBeginDrag; m_InputActionAsset["Walk Mode Action"].performed += OnDrag; m_InputActionAsset["Walk Mode Action"].canceled += OnCancel; #endif m_InputActionAsset["Walk Mode Action Tap"].canceled += OnCancel; m_InputActionMap = m_InputActionAsset.FindActionMap("Walk"); m_InputActionMap.Disable(); m_DisposeOnDestroy.Add(m_MeasureToolStateSelector = UISelectorFactory.createSelector <bool>(MeasureToolContext.current, nameof(IMeasureToolDataProvider.toolState), OnMeasureToolToolChanged)); m_DisposeOnDestroy.Add(m_WalkModeEnableSelector = UISelectorFactory.createSelector <bool>(WalkModeContext.current, nameof(IWalkModeDataProvider.walkEnabled), OnWalkEnable)); m_DisposeOnDestroy.Add(m_WalkInstructionStateSelector = UISelectorFactory.createSelector <SetInstructionUIStateAction.InstructionUIState>(WalkModeContext.current, nameof(IWalkModeDataProvider.instructionUIState))); m_DisposeOnDestroy.Add(m_WalkInstructionSelector = UISelectorFactory.createSelector <IWalkInstructionUI>(WalkModeContext.current, nameof(IWalkModeDataProvider.instruction))); m_DisposeOnDestroy.Add(m_ScaleFactorSelector = UISelectorFactory.createSelector <float>(UIStateContext.current, nameof(IUIStateDisplayProvider <DisplayData> .display) + "." + nameof(IDisplayDataProvider.scaleFactor))); m_DisposeOnDestroy.Add(UISelectorFactory.createSelector <OpenDialogAction.DialogType>(UIStateContext.current, nameof(IDialogDataProvider.activeDialog), type => { m_CachedDialog = type; CheckJoystickAvailable(); })); m_DisposeOnDestroy.Add(UISelectorFactory.createSelector <OpenDialogAction.DialogType>(UIStateContext.current, nameof(IDialogDataProvider.activeSubDialog), type => { m_CachedSubDialog = type; CheckJoystickAvailable(); })); m_DisposeOnDestroy.Add(UISelectorFactory.createSelector <SetDialogModeAction.DialogMode>(UIStateContext.current, nameof(IDialogDataProvider.dialogMode), type => { m_CachedDialogMode = type; CheckJoystickAvailable(); })); m_DisposeOnDestroy.Add(UISelectorFactory.createSelector <SetActiveToolAction.ToolType>(ToolStateContext.current, nameof(IToolStateDataProvider.activeTool), type => { m_CachedActiveTool = type; CheckJoystickAvailable(); })); m_JoystickImages = m_LeftJoystick.GetComponentsInChildren <Image>(); }
void OnDialogModeChanged(SetDialogModeAction.DialogMode mode) { if (mode == SetDialogModeAction.DialogMode.Normal) { if (m_DialogWindow.open) { m_DialogButton.selected = true; IEnumerator WaitNextFrame() { yield return(null); Dispatcher.Dispatch(OpenSubDialogAction.From(OpenDialogAction.DialogType.LeftSidebarMore)); } StartCoroutine(WaitNextFrame()); } } }
void OnDialogModeChanged(SetDialogModeAction.DialogMode newData) { UpdateButtons(); }