Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
ContentHomeLog Class Reference
Inheritance diagram for ContentHomeLog:
EContent UIContent UINote

Public Member Functions

override void OnSwitchContent (int idTab)
 
void RefreshLog ()
 
- Public Member Functions inherited from UIContent
virtual void OnSwitchContent (int idTab)
 
virtual void OnInstantiate ()
 
- Public Member Functions inherited from UINote
void Clear ()
 
void Build ()
 
void Space (int sizeY=0, int sizeX=1)
 
UINote AddNote (string id)
 
UIItem AddHeader (string text, Sprite sprite=null)
 
UIItem AddHeaderCard (string text, Sprite sprite=null)
 
UIItem AddHeaderTopic (string text, Sprite sprite=null)
 
UIItem AddHeader (string id, string text, Sprite sprite=null)
 
UIItem AddText (string text, FontColor color=FontColor.DontChange)
 
UIItem AddText (string id, string text, FontColor color=FontColor.DontChange)
 
UIItem AddText (string id, string text, Color color)
 
UIItem AddItem (string id)
 
UIItem AddTopic (string id, string text, string value=null)
 
UIItem AddTopic (string text, string value=null)
 
void AddImage (Sprite sprite)
 
void AddImage (string idFile)
 
UIButton AddButton (string text, Action onClick)
 
UIButton AddButtonLink (string text, string url)
 
UIDropdown AddDropdown (string id="DropdownDefault")
 
UIButton AddToggle (string idLang="", bool isOn=false, Action< bool > action=null)
 
Transform AddPrefab (string path)
 
AddExtra< T > (string path)
 

Public Attributes

UIList listLog
 
ItemStatistics stat
 
ItemStatistics statLast
 
- Public Attributes inherited from UINote
RectTransform target
 
UINoteProfile prof
 
SkinType skinType
 
string idDefaultText
 
LayoutGroup layout
 
RectTransform cur
 
bool extraRebuild
 

Detailed Description

Definition at line 1 of file ContentHomeLog.cs.

Member Function Documentation

◆ OnSwitchContent()

override void ContentHomeLog.OnSwitchContent ( int  idTab)
inlinevirtual

Reimplemented from UIContent.

Definition at line 9 of file ContentHomeLog.cs.

10 {
12 RefreshLog();
13 }
ItemStatistics stat
Definition: EClass.cs:5
static FactionBranch Branch
Definition: EClass.cs:22
Statistics statistics
void Refresh(FactionBranch.Statistics stat)

References EClass.Branch, ItemStatistics.Refresh(), RefreshLog(), stat, and FactionBranch.statistics.

◆ RefreshLog()

void ContentHomeLog.RefreshLog ( )
inline

Definition at line 15 of file ContentHomeLog.cs.

16 {
17 UIList uIList = listLog;
18 uIList.callbacks = new UIList.Callback<MsgLog.Data, UIItem>
19 {
20 onInstantiate = delegate(MsgLog.Data a, UIItem b)
21 {
22 b.text1.text = a.text.ToTitleCase();
23 if (!a.col.IsEmpty())
24 {
25 b.text1.SetColor(a.col.ToEnum<FontColor>());
26 }
27 b.text2.text = a.date.month + "/" + a.date.day + " " + ((a.date.hour < 10) ? "0" : "") + a.date.hour + ":" + ((a.date.min < 10) ? "0" : "") + a.date.min;
28 }
29 };
30 uIList.Clear();
31 foreach (MsgLog.Data item in EClass.Branch.log.GetList(reverse: true))
32 {
33 uIList.Add(item);
34 }
35 uIList.Refresh();
36 this.RebuildLayout(recursive: true);
37 }
FontColor
Definition: FontColor.cs:2
Definition: MsgLog.cs:7
List< Data > GetList(bool reverse=false)
Definition: MsgLog.cs:80
Definition: UIItem.cs:5
UIText text1
Definition: UIItem.cs:6
Definition: UIList.cs:9
override void Clear()
Definition: UIList.cs:349
override void Add(object item)
Definition: UIList.cs:302
virtual void Refresh(bool highlightLast=false)
Definition: UIList.cs:424
void SetColor(FontColor c)
Definition: UIText.cs:234

References UIList.Add(), EClass.Branch, UIList.Clear(), MsgLog.GetList(), item, listLog, FactionBranch.log, UIList.Refresh(), UIText.SetColor(), and UIItem.text1.

Referenced by OnSwitchContent().

Member Data Documentation

◆ listLog

UIList ContentHomeLog.listLog

Definition at line 3 of file ContentHomeLog.cs.

Referenced by RefreshLog().

◆ stat

ItemStatistics ContentHomeLog.stat

Definition at line 5 of file ContentHomeLog.cs.

Referenced by OnSwitchContent().

◆ statLast

ItemStatistics ContentHomeLog.statLast

Definition at line 7 of file ContentHomeLog.cs.


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