Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
WidgetStockTracker Class Reference
Inheritance diagram for WidgetStockTracker:
Widget EMono IChangeResolution ISkinRoot

Public Member Functions

override void OnActivate ()
 
void _Refresh ()
 
- Public Member Functions inherited from Widget
void Test ()
 
bool IsInRightMode ()
 
void Activate ()
 
void RefreshOrder ()
 
virtual void OnActivate ()
 
virtual object CreateExtra ()
 
void Deactivate ()
 
virtual void OnDeactivate ()
 
void Close ()
 
void Reactivate ()
 
virtual void OnManagerActivate ()
 
virtual void OnManagerDeactivate ()
 
void SetAnchor (RectPosition p)
 
void SetPivot (RectPosition p)
 
virtual void OnChangePivot ()
 
void UpdateConfig ()
 
virtual void OnUpdateConfig ()
 
void ClampToScreen ()
 
virtual void OnChangeResolution ()
 
void OnChangePosition ()
 
virtual void OnChangeActionMode ()
 
virtual void OnFlip ()
 
bool IsAlignTop ()
 
Layer AddLayer (Layer l, Transform trans)
 
void RefreshTipPivotPosition ()
 
SkinSet GetSkin ()
 
SkinConfig GetSkinConfig ()
 
void SetSkin (int id, int v=0)
 
void TestSkin ()
 
virtual void ApplySkin ()
 
virtual void OnApplySkin ()
 
void InstantiateDeco (SkinDeco deco)
 
void AddDeco (SkinDeco deco)
 
void RemoveDeco (SkinDeco deco)
 
virtual bool CanShowContextMenu ()
 
void ShowContextMenu ()
 
void SetBaseContextMenu (UIContextMenu m)
 
virtual void OnSetContextMenu (UIContextMenu m)
 
void SetGridContextMenu (UIContextMenu m)
 
void SoundActivate ()
 
void OnChangeResolution ()
 
SkinSet GetSkin ()
 
SkinConfig GetSkinConfig ()
 

Static Public Member Functions

static void Refresh ()
 
- Static Public Member Functions inherited from EMono
static int rnd (int a)
 

Public Attributes

UIText text
 
UIText textNum
 
- Public Attributes inherited from Widget
Image imageBG
 
SoundData soundActivate
 
UIDragPanel dragPanel
 
RectTransform tipPivotLeft
 
RectTransform tipPivotRight
 

Static Public Attributes

static WidgetStockTracker Instance
 
- Static Public Attributes inherited from EMono
static Core core
 

Private Attributes

FastString sb = new FastString()
 
FastString lastSb = new FastString()
 
FastString sbNum = new FastString()
 
FastString lastSbNum = new FastString()
 

Additional Inherited Members

- Public Types inherited from Widget
enum  WidgetType { Default , ZoomMenu }
 
enum  State { Active , Inactive }
 
- Protected Member Functions inherited from Widget
void ClampToScreenEnsured (Component c, Vector2 anchoredPos)
 
void ClampToScreen (RectTransform rect, float margin=10f)
 
- Protected Attributes inherited from Widget
bool flip
 
- Properties inherited from Widget
string ID [get]
 
Config config [get]
 
SkinRoot skinRoot [get]
 
bool IsSealed [get]
 
virtual bool ShowStyleMenu [get]
 
virtual bool AlwaysTop [get]
 
virtual bool IsStaticPosition [get]
 
virtual bool AlwaysBottom [get]
 
virtual Type SetSiblingAfter [get]
 
virtual bool ShowInBuildMode [get]
 
virtual bool RightClickToClose [get]
 
virtual bool AllowRightClickToClose [get]
 
- 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 WidgetStockTracker.cs.

Member Function Documentation

◆ _Refresh()

void WidgetStockTracker._Refresh ( )
inline

Definition at line 33 of file WidgetStockTracker.cs.

34 {
35 sb.Clear();
36 sbNum.Clear();
37 HashSet<string> trackedCards = EMono.player.trackedCards;
38 HashSet<string> trackedCategories = EMono.player.trackedCategories;
39 if (trackedCards.Count == 0 && trackedCategories.Count == 0)
40 {
41 sb.Append("何もトラックしてない\n");
42 }
43 else
44 {
45 foreach (string item in trackedCards)
46 {
47 int num = EMono._map.Stocked.cardMap.TryGetValue(item)?.num ?? 0;
48 sb.Append(EMono.sources.cards.map[item].GetName() + "\n");
49 sbNum.Append(num + "\n");
50 }
51 foreach (string item2 in trackedCategories)
52 {
53 PropSetCategory propSetCategory = EMono._map.Stocked.categoryMap[item2];
54 sb.Append(propSetCategory.source.GetText() + "\n");
55 sbNum.Append(propSetCategory.sum + "\n");
56 }
57 }
58 if (!sb.Equals(lastSb) || !sbNum.Equals(lastSbNum))
59 {
60 text.text = sb.ToString();
61 textNum.text = sbNum.ToString();
62 lastSb.Set(sb);
64 this.RebuildLayout();
65 }
66 }
Definition: EMono.cs:4
static Player player
Definition: EMono.cs:11
static Map _map
Definition: EMono.cs:17
static SourceManager sources
Definition: EMono.cs:41
override string ToString()
Definition: FastString.cs:36
FastString Append(string value)
Definition: FastString.cs:119
FastString Clear()
Definition: FastString.cs:112
void Set(string str)
Definition: FastString.cs:66
PropsStocked Stocked
Definition: Map.cs:121
HashSet< string > trackedCategories
Definition: Player.cs:856
HashSet< string > trackedCards
Definition: Player.cs:859
SourceCategory.Row source
Dictionary< string, PropSet > cardMap
Definition: Props.cs:10
Dictionary< string, PropSetCategory > categoryMap
Definition: Props.cs:12
Dictionary< string, CardRow > map
Definition: SourceCard.cs:8
SourceCard cards

References EMono._map, FastString.Append(), Props.cardMap, SourceManager.cards, Props.categoryMap, FastString.Clear(), item, lastSb, lastSbNum, SourceCard.map, EMono.player, sb, sbNum, FastString.Set(), PropSetCategory.source, EMono.sources, Map.Stocked, PropSetCategory.sum, FastString.ToString(), Player.trackedCards, and Player.trackedCategories.

Referenced by Refresh().

◆ OnActivate()

override void WidgetStockTracker.OnActivate ( )
inlinevirtual

Reimplemented from Widget.

Definition at line 19 of file WidgetStockTracker.cs.

20 {
21 Instance = this;
22 Refresh();
23 }
static WidgetStockTracker Instance

References Instance, and Refresh().

◆ Refresh()

static void WidgetStockTracker.Refresh ( )
inlinestatic

Definition at line 25 of file WidgetStockTracker.cs.

26 {
27 if ((bool)Instance)
28 {
30 }
31 }

References _Refresh(), and Instance.

Referenced by OnActivate().

Member Data Documentation

◆ Instance

WidgetStockTracker WidgetStockTracker.Instance
static

Definition at line 5 of file WidgetStockTracker.cs.

Referenced by OnActivate(), and Refresh().

◆ lastSb

FastString WidgetStockTracker.lastSb = new FastString()
private

Definition at line 13 of file WidgetStockTracker.cs.

Referenced by _Refresh().

◆ lastSbNum

FastString WidgetStockTracker.lastSbNum = new FastString()
private

Definition at line 17 of file WidgetStockTracker.cs.

Referenced by _Refresh().

◆ sb

FastString WidgetStockTracker.sb = new FastString()
private

Definition at line 11 of file WidgetStockTracker.cs.

Referenced by _Refresh().

◆ sbNum

FastString WidgetStockTracker.sbNum = new FastString()
private

Definition at line 15 of file WidgetStockTracker.cs.

Referenced by _Refresh().

◆ text

UIText WidgetStockTracker.text

Definition at line 7 of file WidgetStockTracker.cs.

◆ textNum

UIText WidgetStockTracker.textNum

Definition at line 9 of file WidgetStockTracker.cs.


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