private void OnClosePressed()
    {
        OnCloseEvent?.Invoke();
        contentAnimator.Hide(true);

        AudioScriptableObjects.dialogClose.Play(true);
    }
    public void Hide(bool instant)
    {
        if (instant)
        {
            showHideAnimator.Hide(true);

            AudioScriptableObjects.dialogClose.Play(true);
        }
        else
        {
            timer        = idleTime;
            this.enabled = true;
        }
    }
示例#3
0
    internal void ShowMoreMenu(bool visible, bool instant = false)
    {
        if (visible)
        {
            if (!moreMenuAnimator.gameObject.activeInHierarchy)
            {
                moreMenuAnimator.gameObject.SetActive(true);
            }

            moreMenuAnimator.Show(instant);
        }
        else
        {
            if (!moreMenuAnimator.gameObject.activeInHierarchy)
            {
                moreMenuAnimator.gameObject.SetActive(false);
            }
            else
            {
                moreMenuAnimator.Hide(instant);
            }
        }

        OnMoreMenuOpened?.Invoke(visible);
    }
    IEnumerator HideRoutine()
    {
        yield return(new WaitForSeconds(HIDE_DELAY));

        showHideAnimator.Hide();
        hideRoutine = null;
    }
 void Hide()
 {
     StartDelayRoutine(setHideDelay, () =>
     {
         showHideAnimator.Hide();
     });
 }
示例#6
0
 public void HideMenu()
 {
     if (menuShowHideAnimator.isVisible)
     {
         menuShowHideAnimator.Hide();
         CommonScriptableObjects.isProfileHUDOpen.Set(false);
     }
 }
示例#7
0
 void IOwnersPopupView.Hide(bool instant)
 {
     showHideAnimator.Hide();
     if (instant)
     {
         gameObject.SetActive(false);
     }
 }
 internal void HideMenu()
 {
     if (menuShowHideAnimator.isVisible)
     {
         menuShowHideAnimator.Hide();
         CommonScriptableObjects.isProfileHUDOpen.Set(false);
         OnClose?.Invoke();
     }
 }
        public void Initialize(IHUD hudController, ISettingsPanelHUDController settingsPanelController)
        {
            this.hudController           = hudController;
            this.settingsPanelController = settingsPanelController;

            openAction.OnTriggered += OpenAction_OnTriggered;

            resetAllButton.onClick.AddListener(ShowResetAllConfirmation);
            resetAllCancelButton.onClick.AddListener(HideResetAllConfirmation);
            resetAllOkButton.onClick.AddListener(ResetAllSettings);

            closeButton.onClick.AddListener(CloseSettingsPanel);
            settingsAnimator.OnWillFinishHide += OnFinishHide;

            CreateSections();
            isOpen = !settingsAnimator.hideOnEnable;
            settingsAnimator.Hide(true);
        }
示例#10
0
 public void AnimatorShow(bool isVisible)
 {
     if (isVisible)
     {
         showHideAnimator.Show();
     }
     else
     {
         showHideAnimator.Hide();
     }
 }
示例#11
0
    private IEnumerator ShowCopyToast()
    {
        if (!copyToast.gameObject.activeSelf)
        {
            copyToast.gameObject.SetActive(true);
        }
        copyToast.Show();
        yield return(new WaitForSeconds(COPY_TOAST_VISIBLE_TIME));

        copyToast.Hide();
    }
示例#12
0
 public void ToggleMenu()
 {
     if (showHideAnimator.isVisible)
     {
         showHideAnimator.Hide();
     }
     else
     {
         showHideAnimator.Show();
     }
 }
示例#13
0
 internal void ShowMoreMenu(bool visible, bool instant = false)
 {
     if (visible)
     {
         moreMenuAnimator.Show(instant);
     }
     else
     {
         moreMenuAnimator.Hide(instant);
     }
 }
示例#14
0
 public void SetVisibility(bool visible)
 {
     if (visible && !mainShowHideAnimator.isVisible)
     {
         mainShowHideAnimator.Show();
     }
     else if (!visible && mainShowHideAnimator.isVisible)
     {
         mainShowHideAnimator.Hide();
     }
 }
    protected void Awake()
    {
        crowdCountContainer.SetActive(false);
        eventsContainer.SetActive(false);

        jumpInHoverArea.OnPointerEnter += () =>
        {
            jumpInButtonAnimator.gameObject.SetActive(true);
            jumpInButtonAnimator.Show();
        };
        jumpInHoverArea.OnPointerExit += () => jumpInButtonAnimator.Hide();
        sceneInfoButton.OnPointerDown += () => jumpInButtonAnimator.Hide(true);

        // NOTE: we don't use the pointer down callback to avoid being mistakenly pressed while dragging
        jumpIn.onClick.AddListener(JumpInPressed);

        sceneInfoButton.OnPointerDown += () => OnInfoButtonPointerDown?.Invoke(this);
        sceneInfoButton.OnPointerExit += () => OnInfoButtonPointerExit?.Invoke();

        Initialize();
    }
    internal void ShowBar(bool visible, bool instant = false)
    {
        if (visible)
        {
            taskbarAnimator.Show(instant);
        }
        else
        {
            taskbarAnimator.Hide(instant);
        }

        isBarVisible = visible;
    }
示例#17
0
 void IBuilderProjectsPanelView.SetVisible(bool visible)
 {
     if (visible)
     {
         if (!gameObject.activeSelf)
         {
             gameObject.SetActive(true);
         }
         showHideAnimator.Show();
     }
     else
     {
         showHideAnimator.Hide();
     }
 }
示例#18
0
 public void SetVisibility(bool visible)
 {
     if (visible)
     {
         if (!IsActive())
         {
             popup.gameObject.SetActive(true);
         }
         popup.Show();
     }
     else
     {
         popup.Hide();
     }
 }
示例#19
0
        public void SetVisibility(bool visible)
        {
            closeAction.OnTriggered -= closeActionDelegate;
            if (visible)
            {
                helpAndSupportAnimator.Show();
                closeAction.OnTriggered += closeActionDelegate;
            }
            else
                helpAndSupportAnimator.Hide();

            if (!visible && isOpen)
                OnClose?.Invoke();

            isOpen = visible;
        }
示例#20
0
        public void SetVisibility(bool visible)
        {
            if (visible)
            {
                helpAndSupportAnimator.Show();
            }
            else
            {
                helpAndSupportAnimator.Hide();
            }

            if (!visible && isOpen)
            {
                OnClose?.Invoke();
            }

            isOpen = visible;
        }
示例#21
0
    void IUsersAroundListHUDListView.SetVisibility(bool visible)
    {
        if (visible)
        {
            if (!gameObject.activeSelf)
            {
                gameObject.SetActive(true);
            }

            showHideAnimator.Show();
        }
        else
        {
            showHideAnimator.Hide();
            contextMenu.Hide();
            confirmationDialog.Hide();
        }
    }
示例#22
0
        public void SetVisibility(bool visible)
        {
            if (visible)
            {
                goToGenesisPlazaAnimator.Show();
            }
            else
            {
                goToGenesisPlazaAnimator.Hide();
            }

            if (!visible && isOpen)
            {
                OnClose?.Invoke();
            }

            isOpen = visible;
        }
示例#23
0
    public void SetLineIndicator(bool on)
    {
        if (lineOnIndicator != null)
        {
            if (on)
            {
                lineOnIndicator.Show();
            }
            else
            {
                lineOnIndicator.Hide();
            }
        }

        if (lineOffIndicator != null)
        {
            lineOffIndicator.SetActive(!on);
        }
    }
示例#24
0
    public void Dismiss()
    {
        StopTimer();

        if (showHideAnimator != null)
        {
            showHideAnimator.OnWillFinishHide -= DismissInternal;
            showHideAnimator.OnWillFinishHide += DismissInternal;
            showHideAnimator.Hide();
        }
        else
        {
            DismissInternal();
        }

        if (this != null)
        {
            OnNotificationDismissed?.Invoke(this);
        }
    }
    private IEnumerator PlayMoreMenuAnimations(bool visible, bool instant = false)
    {
        if (visible)
        {
            moreMenuAnimator.Show(instant);

            for (int i = 0; i < sortedButtonsAnimations.Count; i++)
            {
                if (!sortedButtonsAnimations[i].gameObject.activeInHierarchy ||
                    sortedButtonsAnimations[i].lastPlayedAnimation == TaskbarMoreMenuButton.AnimationStatus.In)
                {
                    continue;
                }

                sortedButtonsAnimations[i].PlayAnimation(TaskbarMoreMenuButton.AnimationStatus.In);
                yield return(new WaitForSeconds(timeBetweenAnimations));
            }
        }
        else
        {
            for (int j = sortedButtonsAnimations.Count - 1; j >= 0; j--)
            {
                if (!sortedButtonsAnimations[j].gameObject.activeInHierarchy ||
                    sortedButtonsAnimations[j].lastPlayedAnimation == TaskbarMoreMenuButton.AnimationStatus.Out)
                {
                    continue;
                }

                sortedButtonsAnimations[j].PlayAnimation(TaskbarMoreMenuButton.AnimationStatus.Out);
                yield return(new WaitForSeconds(timeBetweenAnimations));
            }

            if (sortedButtonsAnimations.Count > 0)
            {
                yield return(new WaitForSeconds(sortedButtonsAnimations[0].GetAnimationLenght()));
            }

            moreMenuAnimator.Hide(instant);
        }
    }
示例#26
0
        public void SetVisibility(bool visible)
        {
            if (visible && !isOpen)
            {
                AudioScriptableObjects.dialogOpen.Play(true);
            }
            else if (isOpen)
            {
                AudioScriptableObjects.dialogClose.Play(true);
            }

            if (visible)
            {
                settingsAnimator.Show();
            }
            else
            {
                settingsAnimator.Hide();
            }

            isOpen = visible;
        }
    internal void ShowMenu(bool visible, bool instant = false)
    {
        if (visible)
        {
            if (!menuAnimator.gameObject.activeInHierarchy)
            {
                menuAnimator.gameObject.SetActive(true);
            }

            menuAnimator.Show(instant);
        }
        else
        {
            if (!menuAnimator.gameObject.activeInHierarchy)
            {
                menuAnimator.gameObject.SetActive(false);
            }
            else
            {
                menuAnimator.Hide(instant);
            }
        }
    }
示例#28
0
        public void SetVisibility(bool visible)
        {
            if (visible && !isOpen)
            {
                AudioScriptableObjects.dialogOpen.Play(true);
            }
            else if (isOpen)
            {
                AudioScriptableObjects.dialogClose.Play(true);
            }

            closeAction.OnTriggered -= closeActionDelegate;
            if (visible)
            {
                closeAction.OnTriggered += closeActionDelegate;
                settingsAnimator.Show();
            }
            else
            {
                settingsAnimator.Hide();
            }

            isOpen = visible;
        }
 public void Hide()
 {
     showHideAnimator.Hide();
 }
示例#30
0
 public void OnPointerExit(PointerEventData eventData)
 {
     labelContainer.Hide();
 }