Elin Decompiled Documentation
EA 23.102 Nightly
Loading...
Searching...
No Matches
ContentHomeRanking.cs
Go to the documentation of this file.
1
using
System.Collections.Generic;
2
using
UnityEngine;
3
4
public
class
ContentHomeRanking
:
EContent
5
{
6
public
UIDynamicList
listRanking
;
7
8
public
Color
[]
colors
;
9
10
public
override
void
OnSwitchContent
(
int
idTab)
11
{
12
Refresh
();
13
}
14
15
public
void
Refresh
()
16
{
17
List<RankedZone> ranks =
EClass
.
game
.
spatials
.
ranks
.
GetList
();
18
UIDynamicList
list =
listRanking
;
19
list.
Clear
();
20
list.callbacks =
new
UIList
.
Callback
<
RankedZone
,
UIItem
>
21
{
22
onClick = delegate
23
{
24
},
25
onRedraw = delegate(
RankedZone
a,
UIItem
b,
int
i)
26
{
27
b.text1.text = ((a.z.visitCount > 0) ? a.
Name
:
"?????"
);
28
b.text2.text =
$
"{a.Value:#,0}"
;
29
b.text3.text = a.
rank
.ToString() ??
""
;
30
b.text4.text = a.
GetFactionName
();
31
b.image1.sprite = a.
GetSprite
() ?? b.
image1
.sprite;
32
b.
image1
.SetNativeSize();
33
b.text3.color =
colors
[(a.rank > 3) ? ((a.
rank
<= 10) ? 1 : ((a.rank <= 100) ? 2 : 3)) : 0];
34
b.
image2
.SetActive(a.
z
.
IsPCFaction
);
35
},
36
onList = delegate
37
{
38
foreach
(
RankedZone
item
in
ranks)
39
{
40
list.
Add
(
item
);
41
}
42
},
43
onRefresh =
null
44
};
45
list.
List
();
46
int
num = -1;
47
foreach
(
RankedZone
item2
in
ranks)
48
{
49
if
(item2.
z
==
EClass
.
_zone
)
50
{
51
num = list.objects.IndexOf(item2);
52
}
53
}
54
if
(num != -1)
55
{
56
list.dsv.scrollByItemIndex(num);
57
list.Refresh();
58
}
59
this.RebuildLayout(recursive:
true
);
60
}
61
}
ContainerFlag.item
@ item
FOWType.Color
@ Color
$
$
Definition:
SearchContext.cs:86
ContentHomeRanking
Definition:
ContentHomeRanking.cs:5
ContentHomeRanking.Refresh
void Refresh()
Definition:
ContentHomeRanking.cs:15
ContentHomeRanking.listRanking
UIDynamicList listRanking
Definition:
ContentHomeRanking.cs:6
ContentHomeRanking.OnSwitchContent
override void OnSwitchContent(int idTab)
Definition:
ContentHomeRanking.cs:10
ContentHomeRanking.colors
Color[] colors
Definition:
ContentHomeRanking.cs:8
EClass
Definition:
EClass.cs:5
EClass.game
static Game game
Definition:
EClass.cs:8
EClass._zone
static Zone _zone
Definition:
EClass.cs:20
EContent
Definition:
EContent.cs:2
Game.spatials
SpatialManager spatials
Definition:
Game.cs:152
RankedZoneManager.GetList
List< RankedZone > GetList()
Definition:
RankedZoneManager.cs:47
RankedZone
Definition:
RankedZone.cs:5
RankedZone.Name
string Name
Definition:
RankedZone.cs:14
RankedZone.GetSprite
Sprite GetSprite()
Definition:
RankedZone.cs:29
RankedZone.rank
int rank
Definition:
RankedZone.cs:8
RankedZone.z
Zone z
Definition:
RankedZone.cs:6
RankedZone.GetFactionName
string GetFactionName()
Definition:
RankedZone.cs:16
SpatialManager.ranks
RankedZoneManager ranks
Definition:
SpatialManager.cs:23
UIDynamicList
Definition:
UIDynamicList.cs:8
UIDynamicList.List
override void List()
Definition:
UIDynamicList.cs:235
UIDynamicList.Add
override void Add(object o)
Definition:
UIDynamicList.cs:68
UIDynamicList.Clear
override void Clear()
Definition:
UIDynamicList.cs:62
UIItem
Definition:
UIItem.cs:5
UIItem.image2
Image image2
Definition:
UIItem.cs:16
UIItem.image1
Image image1
Definition:
UIItem.cs:14
UIList.Callback
Definition:
UIList.cs:53
UIList
Definition:
UIList.cs:9
Zone.IsPCFaction
bool IsPCFaction
Definition:
Zone.cs:464
Elin
ContentHomeRanking.cs
Generated by
1.9.6