Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
ItemPopulation Class Reference
Inheritance diagram for ItemPopulation:
EMono

Public Member Functions

void SetTopic (ContentPopulation.Topic t)
 

Public Attributes

UIItem header
 
LayoutGroup layout
 

Additional Inherited Members

- Static Public Member Functions inherited from EMono
static int rnd (int a)
 
- Static Public Attributes inherited from EMono
static Core core
 
- Properties inherited from EMono
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SoundManager Sound [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static CoreDebug debug [get]
 

Detailed Description

Definition at line 4 of file ItemPopulation.cs.

Member Function Documentation

◆ SetTopic()

void ItemPopulation.SetTopic ( ContentPopulation::Topic  t)
inline

Definition at line 10 of file ItemPopulation.cs.

11 {
12 header.text1.text = t.header + " ( " + t.list.Count + " )";
13 header.image1.color = ContentPopulation.Instance.colors[t.color];
14 UIButton t2 = layout.CreateMold<UIButton>();
15 foreach (Chara c in t.list)
16 {
17 UIButton uIButton = Util.Instantiate(t2, layout);
18 uIButton.icon.sprite = c.GetSprite();
19 uIButton.icon.SetNativeSize();
20 uIButton.icon.transform.localScale = (c.IsPCC ? Vector3.one : new Vector3(0.7f, 0.7f, 1f));
21 uIButton.icon.rectTransform.pivot = (c.IsPCC ? new Vector2(0.5f, 0f) : new Vector2(0.5f, 0.1f));
22 uIButton.icon.rectTransform.anchoredPosition = Vector2.zero;
23 uIButton.onClick.AddListener(delegate
24 {
25 EMono.ui.AddLayerDontCloseOthers<LayerChara>().SetChara(c);
26 });
27 uIButton.tooltip.onShowTooltip = delegate(UITooltip a)
28 {
29 a.textMain.text = c.Name;
30 };
31 }
32 }
string Name
Definition: Card.cs:2013
Definition: Chara.cs:10
override Sprite GetSprite(int dir=0)
Definition: Chara.cs:6046
static ContentPopulation Instance
Definition: EMono.cs:4
static UI ui
Definition: EMono.cs:15
LayoutGroup layout
Image icon
Definition: UIButton.cs:110
Definition: Util.cs:10
static Transform Instantiate(string path, Component parent=null)
Definition: Util.cs:67

References ContentPopulation.colors, Chara.GetSprite(), UIButton.icon, ContentPopulation.Instance, layout, Card.Name, EMono.ui, and Util.

Referenced by ContentPopulation.Refresh().

Member Data Documentation

◆ header

UIItem ItemPopulation.header

Definition at line 6 of file ItemPopulation.cs.

◆ layout

LayoutGroup ItemPopulation.layout

Definition at line 8 of file ItemPopulation.cs.

Referenced by SetTopic().


The documentation for this class was generated from the following file: