void OnActiveDialogChanged(OpenDialogAction.DialogType newData)
 {
     if (newData == OpenDialogAction.DialogType.BimInfo)
     {
         m_SearchInput.text = null;
     }
     m_SelectButton.selected = newData == OpenDialogAction.DialogType.BimInfo;
 }
 void OnActiveDialogChanged(OpenDialogAction.DialogType obj)
 {
     if (obj != OpenDialogAction.DialogType.None)
     {
         m_DeltaDnaRequest.TrackButtonEvent(m_DeltaDnaRequest.userId,
                                            m_DialogModeSelector.GetValue() == SetDialogModeAction.DialogMode.Help ? $"HelpMode_{obj}" : $"ButtonType_{obj}");
     }
 }
        void OnActiveSubDialogChanged(OpenDialogAction.DialogType data)
        {
            if (m_ToolStateSelector != null)
            {
                m_DialogButton.transform.parent.gameObject.SetActive(m_ButtonVisibility && data != OpenDialogAction.DialogType.LandingScreen);

                m_DialogButton.selected = data == OpenDialogAction.DialogType.SceneOptions;
                m_DebugOptionMenu?.SetActive(m_ToolStateSelector.GetValue() == SetInfoTypeAction.InfoType.Debug);
            }
        }
        void OnActiveDialogChanged(OpenDialogAction.DialogType data)
        {
            var open = data == OpenDialogAction.DialogType.Marker;

            if (open != m_Visible)
            {
                m_Visible = open;
                HandleMarkersUpdated();
            }
        }
Esempio n. 5
0
 void OnActiveDialogChanged(OpenDialogAction.DialogType data)
 {
     switch (data)
     {
     case OpenDialogAction.DialogType.CollaborationUserInfo:
     case OpenDialogAction.DialogType.CollaborationUserList:
         UpdateList(m_MatchmakerIds);
         break;
     }
 }
        void OnActiveDialogChanged(OpenDialogAction.DialogType newData)
        {
            m_DialogButton.selected = newData == OpenDialogAction.DialogType.Filters;
            if (newData == OpenDialogAction.DialogType.Filters)
            {
                m_SearchInput.text = null;

                if (m_LastReceivedFilterItemInfo != null)
                {
                    RebuildList(m_LastReceivedFilterItemInfo);
                }
            }
        }
Esempio n. 7
0
 void OnActiveSubDialogChanged(OpenDialogAction.DialogType data)
 {
     if (m_DialogType != OpenDialogAction.DialogType.None)
     {
         if (m_IsSubDialog && data == m_DialogType)
         {
             m_ButtonImage.color = UIConfig.propertySelectedColor;
         }
         else
         {
             m_ButtonImage.color = Color.clear;
         }
     }
 }
        void OnActiveSubDialogChanged(OpenDialogAction.DialogType newData)
        {
            m_AccountDialog.Close();
            m_LinkSharingDialog.Close();
            m_NavigationGizmoModeFanOut.Close();
            m_SceneOptionsDialog.Close();
            m_NavigationModeFlyOut.Close();

            if (m_DialogModeSelector.GetValue() == SetDialogModeAction.DialogMode.Help)
            {
                m_HelpDialogController.Display(newData);
                return;
            }

            m_LeftSidebarMoreDialog.Close();

            switch (newData)
            {
            case OpenDialogAction.DialogType.None:
                break;

            case OpenDialogAction.DialogType.Account:
                m_AccountDialog.Open();
                break;

            case OpenDialogAction.DialogType.LinkSharing:
                m_LinkSharingDialog.Open();
                break;

            case OpenDialogAction.DialogType.GizmoMode:
                m_NavigationGizmoModeFanOut.Open();
                break;

            case OpenDialogAction.DialogType.SceneOptions:
                m_SceneOptionsDialog.Open();
                break;

            case OpenDialogAction.DialogType.NavigationMode:
                m_NavigationModeFlyOut.Open();
                break;

            case OpenDialogAction.DialogType.LeftSidebarMore:
                m_LeftSidebarMoreDialog.Open();
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
        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>();
        }
Esempio n. 10
0
 public void Display(OpenDialogAction.DialogType dialogTypeId)
 {
     Assert.IsNotNull(m_Data.entries);
     if (dialogTypeId == OpenDialogAction.DialogType.None)
     {
         return;
     }
     foreach (var entry in m_Data.entries)
     {
         if (entry.dialogTypeId == dialogTypeId)
         {
             DisplayEntry(entry, true);
             return;
         }
     }
     Debug.LogError($"Could not find help dialog data corresponding to id [{dialogTypeId}]");
 }
        void OnStateDataChanged(OpenDialogAction.DialogType data)
        {
            if (m_MarkerDialogWindow != null)
            {
                bool open = data == OpenDialogAction.DialogType.Marker;
                m_DialogButton.selected = open;

                if (!open)
                {
                    SetEditPanel(false);
                }
                else if (open && m_MarkerController.ReadOnly)
                {
                    m_MarkerDialogWindow.Close();
                }
            }
        }
Esempio n. 12
0
        void OnActiveSubDialogChanged(OpenDialogAction.DialogType newData)
        {
            if (newData == OpenDialogAction.DialogType.ARCardSelection)
            {
                m_NavigationButton.SetIcon(m_ARButton.buttonIcon.sprite);
                m_NavigationButton.selected = true;
            }
            else
            {
                if (m_NavigationButton.selected != (newData == OpenDialogAction.DialogType.NavigationMode))
                {
                    SetNavigationButtonIcon(m_NavigationModeSelector.GetValue());
                }

                m_NavigationButton.selected = newData == OpenDialogAction.DialogType.NavigationMode;
            }
        }
Esempio n. 13
0
        void OnActiveDialogChanged(OpenDialogAction.DialogType newData)
        {
            if (newData != OpenDialogAction.DialogType.None &&
                m_ActiveSubDialogGetter.GetValue() == OpenDialogAction.DialogType.LeftSidebarMore)
            {
                m_DialogButton.selected = false;
                m_DialogWindow.Close();

                IEnumerator WaitAFrame()
                {
                    yield return(null);

                    Dispatcher.Dispatch(OpenSubDialogAction.From(OpenDialogAction.DialogType.None));
                }

                StartCoroutine(WaitAFrame());
            }
        }
Esempio n. 14
0
        void UpdateUserGroupBubble(string[] connectedIds, OpenDialogAction.DialogType activeDialog)
        {
            int nbUngroupedAvatars = maxHorizontalAvatars - 1;

            if (connectedIds.Length > maxHorizontalAvatars)
            {
                m_GroupBubble.SetActive(true);
                m_GroupBubbleText.text = $"+{(connectedIds.Length - nbUngroupedAvatars).ToString()}";
            }
            else
            {
                m_GroupBubble.SetActive(false);
                if (activeDialog == OpenDialogAction.DialogType.CollaborationUserList)
                {
                    Dispatcher.Dispatch(OpenDialogAction.From(OpenDialogAction.DialogType.None));
                }
            }
        }
Esempio n. 15
0
        void OnActiveDialogChanged(OpenDialogAction.DialogType data)
        {
            if (data != OpenDialogAction.DialogType.None)
            {
                if (m_DialogWindow.open)
                {
                    m_Active = true;
                }

                m_DialogWindow.Close();
            }
            else
            {
                if (m_Active)
                {
                    m_DialogWindow.Open();
                }
            }
        }
 void OnActiveDialogChanged(OpenDialogAction.DialogType data)
 {
     m_DialogButton.selected = data == OpenDialogAction.DialogType.SceneSettings;
 }
Esempio n. 17
0
 void OnActiveSubDialogChanged(OpenDialogAction.DialogType newData)
 {
     m_DialogButton.selected = newData == OpenDialogAction.DialogType.LeftSidebarMore;
 }
        void OnActiveDialogChanged(OpenDialogAction.DialogType newData)
        {
            m_FiltersDialog.Close();
            m_ClippingToolDialog.Close();
            m_CameraOptionsDialog.Close();
            m_SunStudyDialog.Close();
            m_SequenceDialog.Close();
            m_LandingScreenDialog.Close();
            m_InfoSelectDialog.Close();
            m_ARCardSelectionDialog.Close();
            m_CollaborationUserListDialog.Close();
            m_CollaborationUserInfoDialog.Close();
            m_LoginScreenDialog.Close();
            m_SceneSettingsDialog.Close();
            m_MarkerDialog.Close();
            m_BimDialog.Close();

            if (m_DialogModeSelector.GetValue() == SetDialogModeAction.DialogMode.Help)
            {
                m_HelpDialogController.Display(newData);
                return;
            }

            switch (newData)
            {
            case OpenDialogAction.DialogType.None:
                break;

            case OpenDialogAction.DialogType.Projects:
                // TODO remove this type and ProjectsUIController class
                // m_ProjectsDialog.Open();
                break;

            case OpenDialogAction.DialogType.Filters:
                m_FiltersDialog.Open();
                break;

            case OpenDialogAction.DialogType.ClippingTool:
                m_ClippingToolDialog.Open();
                break;

            case OpenDialogAction.DialogType.CameraOptions:
                m_CameraOptionsDialog.Open();
                break;

            case OpenDialogAction.DialogType.SunStudy:
                m_SunStudyDialog.Open();
                break;

            case OpenDialogAction.DialogType.Sequence:
                m_SequenceDialog.Open();
                break;

            case OpenDialogAction.DialogType.SelectTool:
                // TODO
                break;

            case OpenDialogAction.DialogType.LandingScreen:
                m_LandingScreenDialog.Open();
                break;

            case OpenDialogAction.DialogType.InfoSelect:
                m_InfoSelectDialog.Open();
                break;

            case OpenDialogAction.DialogType.ARCardSelection:
                m_ARCardSelectionDialog.Open();
                break;

            case OpenDialogAction.DialogType.CollaborationUserList:
                m_CollaborationUserListDialog.Open();
                break;

            case OpenDialogAction.DialogType.CollaborationUserInfo:
                m_CollaborationUserInfoDialog.Open();
                break;

            case OpenDialogAction.DialogType.LoginScreen:
                m_LoginScreenDialog.Open();
                break;

            case OpenDialogAction.DialogType.SceneSettings:
                m_SceneSettingsDialog.Open();
                break;

            case OpenDialogAction.DialogType.Marker:
                m_MarkerDialog.Open();
                break;

            case OpenDialogAction.DialogType.BimInfo:
                m_BimDialog.Open();
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Esempio n. 19
0
 void OnActiveDialogChanged(OpenDialogAction.DialogType newData)
 {
     UpdateButtons();
 }
 void OnActiveDialogChanged(OpenDialogAction.DialogType newData)
 {
     m_InstructionUI.SetActive(newData == OpenDialogAction.DialogType.None);
 }
 void OnActiveDialogChanged(OpenDialogAction.DialogType data)
 {
     m_Button.transform.parent.gameObject.SetActive(m_Visibility && data != OpenDialogAction.DialogType.LandingScreen);
 }