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

Public Member Functions

void SetResource (BaseHomeResource _r)
 

Public Attributes

UIButton button
 
Image imageExp
 

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 3 of file ItemHomeResource.cs.

Member Function Documentation

◆ SetResource()

void ItemHomeResource.SetResource ( BaseHomeResource  _r)
inline

Definition at line 9 of file ItemHomeResource.cs.

10 {
11 switch (_r.Group)
12 {
13 case BaseHomeResource.ResourceGroup.Currency:
14 {
15 HomeResource homeResource = _r as HomeResource;
16 int num2 = homeResource.value - homeResource.lastValue;
17 FontColor fontColor = ((num2 == 0) ? FontColor.Passive : ((num2 > 0) ? FontColor.Good : FontColor.Bad));
18 string text3 = homeResource.value.ToString() ?? "";
19 if (homeResource.value < 0)
20 {
21 text3 = text3.TagColor(FontColor.Bad);
22 }
23 string text4 = text3;
24 button.mainText.text = text4;
25 fontColor = ((num2 == 0) ? FontColor.Passive : ((num2 > 0) ? FontColor.Good : FontColor.Bad));
26 button.subText.text = ((((num2 > 0) ? "+" : "") + num2).TagColor(fontColor) + "dailyIncome".lang()).TagSize(13);
27 break;
28 }
30 {
31 HomeResourceRate homeResourceRate = _r as HomeResourceRate;
32 int num = homeResourceRate.value - homeResourceRate.lastValue;
33 if (num != 0)
34 {
35 _ = 0;
36 }
37 string text = "";
38 if (num > 0)
39 {
40 text = "↑".TagColor(FontColor.Good);
41 }
42 else if (num < 0)
43 {
44 text = "↓".TagColor(FontColor.Bad);
45 }
46 string text2 = homeResourceRate.value + " " + text;
47 button.mainText.text = text2;
48 button.subText.SetActive(enable: false);
49 break;
50 }
51 default:
52 button.mainText.text = "Lv." + _r.value;
53 button.subText.SetActive(enable: false);
54 break;
55 }
56 imageExp.SetActive(_r.IsSkill);
57 imageExp.fillAmount = _r.ExpRatio;
58 button.icon.sprite = _r.Sprite;
59 button.tooltip.onShowTooltip = delegate(UITooltip tp)
60 {
61 _r.WriteNote(tp.note);
62 };
63 }
FontColor
Definition: FontColor.cs:2
virtual void WriteNote(UINote n)
virtual ResourceGroup Group
virtual float ExpRatio
UIText subText
Definition: UIButton.cs:104
UINote note
Definition: UITooltip.cs:21

References button, BaseHomeResource.ExpRatio, BaseHomeResource.Group, imageExp, BaseHomeResource.IsSkill, BaseHomeResource.lastValue, UITooltip.note, BaseHomeResource.Sprite, UIButton.subText, BaseHomeResource.value, and BaseHomeResource.WriteNote().

Referenced by ContentHomeReport.RefreshResources(), and UIHomeInfo.RefreshResources().

Member Data Documentation

◆ button

UIButton ItemHomeResource.button

Definition at line 5 of file ItemHomeResource.cs.

Referenced by SetResource().

◆ imageExp

Image ItemHomeResource.imageExp

Definition at line 7 of file ItemHomeResource.cs.

Referenced by SetResource().


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