Ejemplo n.º 1
0
        public void OnEnable()
        {
            m_PackageDatabase.onPackageProgressUpdate += OnPackageProgressUpdate;

            m_PageManager.onRefreshOperationStart  += OnRefreshOperationStart;
            m_PageManager.onRefreshOperationFinish += OnRefreshOperationFinish;

            m_PageManager.onVisualStateChange += OnVisualStateChange;
            m_PageManager.onListRebuild       += OnListRebuild;
            m_PageManager.onListUpdate        += OnListUpdate;

            m_UnityConnect.onUserLoginStateChange += OnUserLoginStateChange;

            // manually build the items on initialization to refresh the UI
            OnListRebuild(m_PageManager.GetCurrentPage());
        }
Ejemplo n.º 2
0
        public void Refresh()
        {
            var page = m_PageManager.GetCurrentPage();

            Set(page?.numTotalItems ?? 0, page?.numCurrentItems ?? 0);
        }
Ejemplo n.º 3
0
        private void OnUserLoginStateChange(bool loggedIn)
        {
            var page = m_PageManager.GetCurrentPage();

            EnableMenuForCapability(page.capability);
        }