Пример #1
0
    private void OnWindowToggleOn(TaskbarButton obj)
    {
        if (obj == friendsButton)
        {
            OnFriendsToggleOn?.Invoke();
        }
        else if (obj == chatButton)
        {
            OnChatToggleOn?.Invoke();
        }
        else if (obj == settingsButton)
        {
            OnSettingsToggleOn?.Invoke();
        }
        else if (obj == builderInWorldButton)
        {
            OnBuilderInWorldToggleOn?.Invoke();
        }
        else if (obj == exploreButton)
        {
            OnExploreToggleOn?.Invoke();
        }
        else if (obj == moreButton)
        {
            moreMenu.ShowMoreMenu(true);
        }

        SelectButton(obj);
    }
    private void OnWindowToggleOn(TaskbarButton obj)
    {
        if (obj == friendsButton)
        {
            OnFriendsToggleOn?.Invoke();
        }
        else if (obj == chatButton)
        {
            OnChatToggleOn?.Invoke();
        }
        else if (obj == settingsButton)
        {
            OnSettingsToggleOn?.Invoke();
        }
        else if (obj == builderInWorldButton)
        {
            OnBuilderInWorldToggleOn?.Invoke();
        }
        else if (obj == exploreButton)
        {
            OnExploreToggleOn?.Invoke();
        }
        else if (obj == moreButton)
        {
            moreMenu.ShowMoreMenu(true);
        }
        else if (obj == questPanelButton)
        {
            OnQuestPanelToggled?.Invoke(true);
        }
        else
        {
            using (var iterator = activePortableExperienceItems.GetEnumerator())
            {
                while (iterator.MoveNext())
                {
                    if (iterator.Current.Value.mainButton == obj)
                    {
                        iterator.Current.Value.ShowContextMenu(true);
                        break;
                    }
                }
            }
        }

        SelectButton(obj);
    }