コード例 #1
0
        private UXElement CreateUXElementFromGridItem(object itemObject, object cookie, int position)
        {
            GridDataCookie             gridDataCookie             = (GridDataCookie)cookie;
            SocialTabs                 selectedTab                = gridDataCookie.SelectedTab;
            FactionToggle              selectedFaction            = gridDataCookie.SelectedFaction;
            string                     selectedPlanet             = gridDataCookie.SelectedPlanet;
            AbstractLeaderboardRowView abstractLeaderboardRowView = null;

            if (itemObject is PlayerLBEntity)
            {
                abstractLeaderboardRowView = this.AddPlayerRow((PlayerLBEntity)itemObject, selectedTab, selectedFaction, selectedPlanet, position);
            }
            else if (itemObject is Squad)
            {
                abstractLeaderboardRowView = this.AddSquadRow((Squad)itemObject, selectedTab, selectedFaction, position);
            }
            else if (itemObject is SquadInvite)
            {
                abstractLeaderboardRowView = this.AddSquadInviteRow((SquadInvite)itemObject, selectedTab, selectedFaction, position);
            }
            UXElement result = null;

            if (abstractLeaderboardRowView != null)
            {
                result = abstractLeaderboardRowView.GetItem();
                this.rowViews.Add(abstractLeaderboardRowView);
            }
            return(result);
        }
コード例 #2
0
        public virtual void OnRowSelected(AbstractLeaderboardRowView row)
        {
            if (this.selectedRow != null && this.selectedRow == row)
            {
                this.selectedRow.Deselect();
            }
            int i     = 0;
            int count = this.rowViews.Count;

            while (i < count)
            {
                if (this.rowViews[i] != row)
                {
                    this.rowViews[i].Deselect();
                }
                i++;
            }
            if (this.selectedRow != row)
            {
                this.selectedRow = row;
            }
            else
            {
                this.selectedRow = null;
            }
        }
コード例 #3
0
        public void RemoveAndDestroyRow(AbstractLeaderboardRowView rowView)
        {
            UXElement item = rowView.GetItem();

            this.gridLoadHelper.RemoveElement(item);
            base.DestroyElement(item);
            rowView.Destroy();
            this.rowViews.Remove(rowView);
        }
コード例 #4
0
 public override void OnRowSelected(AbstractLeaderboardRowView row)
 {
     base.OnRowSelected(row);
     Service.Get <EventManager>().SendEvent(EventId.UILeaderboardExpand, base.GetSelectedFactionString());
 }