Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
LayerEquip Class Reference
Inheritance diagram for LayerEquip:
ELayer Layer IUISkin

Public Member Functions

override void OnInit ()
 
void Rebuild ()
 
void Redraw ()
 
void RefreshToolBelt (bool rebuildLayout=false)
 
void RefreshEquipment (UIList list, bool etc=false)
 
- Public Member Functions inherited from ELayer
override void OnBeforeAddLayer ()
 
void InitInspector ()
 
sealed override void Init ()
 
override void OnAfterAddLayer ()
 
void TryShowHelp ()
 
void AddLayerToUI (string id)
 
void TryShowHint (string _langHint=null)
 
void TalkHomeMemeber (string id)
 
void TalkMaid (string id)
 
override void OnRightClick ()
 
- Public Member Functions inherited from Layer
virtual string GetTextHeader (Window window)
 
virtual bool HeaderIsListOf (int id)
 
virtual void Init ()
 
virtual void OnInit ()
 
virtual void OnAfterInit ()
 
virtual void ApplySkin ()
 
void ShowScreenLock (string id)
 
void UpdateInput ()
 
virtual void OnUpdateInput ()
 
virtual void OnRightClick ()
 
virtual bool OnBack ()
 
virtual void OnChangeLayer ()
 
virtual void OnCreate ()
 
void _AddLayer (string id)
 
Layer AddLayer (string id)
 
AddLayer< T > ()
 
AddLayer< T > (string id)
 
AddLayerDontCloseOthers< T > ()
 
Layer AddLayerDontCloseOthers (Layer l)
 
GetOrAddLayer< T > ()
 
virtual void OnBeforeAddLayer ()
 
virtual void OnAfterAddLayer ()
 
Layer AddLayer (Layer l)
 
void ToggleLayer (string id)
 
ToggleLayer< T > (string id=null)
 
void WaitAndClose ()
 
void OnClickClose ()
 
virtual void Close ()
 
void CloseLayers ()
 
void RemoveLayers (bool removeImportant=false)
 
bool RemoveLayer< T > ()
 
void RemoveLayer (Layer l)
 
virtual void OnKill ()
 
Layer SetOnKill (Action action)
 
void DisableClose ()
 
void Delay (float duration=0.05f)
 
Layer SetDelay (float d)
 
Layer GetLayer (string id)
 
GetLayer< T > (bool fromTop=false)
 
Layer GetTopLayer ()
 
void SwitchContent (int idWindow, int i)
 
virtual void OnSwitchContent (Window window)
 
Layer SetTitles (string langList, string idHeaderRow=null)
 
bool IsBlockWidgetClick ()
 
bool IsHideHud ()
 
bool IsAllowGeneralInput ()
 
bool IsUseBlur ()
 
bool IsPointerOnLayer ()
 
void ApplySkin ()
 

Static Public Member Functions

static void SetDirty ()
 
- Static Public Member Functions inherited from ELayer
static int rnd (int a)
 
- Static Public Member Functions inherited from Layer
static T Create< T > ()
 
static T Create< T > (string path)
 
static Layer Create (string path)
 

Public Attributes

UIList listMain
 
UIList listEtc
 
Chara chara
 
- Public Attributes inherited from Layer
Option option
 
UnityEvent onKill
 
Anime animeIn
 
Anime animeOut
 
bool closeOthers
 
bool defaultActionMode = true
 
Button screenLock
 
Layer parent
 
string idLayer
 
List< Layerlayers = new List<Layer>()
 
Vector2 lastParentPos
 
List< Windowwindows = new List<Window>()
 
string langHint
 

Static Public Attributes

static LayerEquip Instance
 
static bool dirty
 
- Static Public Attributes inherited from Layer
static int skipInput
 
static bool closeOnRightClick
 
static bool rightClicked
 
static bool cancelKeyDown
 
static bool ignoreSounds
 
static Transform blurStopInstance
 
static string[] searchPath = new string[3] { "Layer", "Layer/Dialog", "Layer/LayerHome" }
 

Additional Inherited Members

- Protected Member Functions inherited from ELayer
sealed override void _Close ()
 
sealed override void Kill ()
 
- Protected Member Functions inherited from Layer
virtual void Awake ()
 
virtual void _Close ()
 
virtual void Kill ()
 
- Protected Attributes inherited from Layer
RectTransform _rect
 
bool isDestroyed
 
- Properties inherited from ELayer
static Core core [get]
 
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static FactionBranch Branch [get]
 
static Faction Home [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static CoreConfig config [get]
 
static GameSetting setting [get]
 
static ColorProfile Colors [get]
 
static SourceManager sources [get]
 
static World world [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 
bool IsFloat [get]
 
virtual string IdHelp [get]
 
- Properties inherited from Layer
Layer TopLayer [get]
 
string uid [get]
 
virtual RectTransform rectLayers [get]
 
virtual bool blockWidgetClick [get]
 

Detailed Description

Definition at line 3 of file LayerEquip.cs.

Member Function Documentation

◆ OnInit()

override void LayerEquip.OnInit ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 20 of file LayerEquip.cs.

21 {
22 windows[0].layer = this;
23 if (!Window.dictData.ContainsKey(windows[0].idWindow) && !ELayer.ui.widgets.GetWidget("BottomBar"))
24 {
25 RectTransform rectTransform = windows[0].Rect();
26 windows[0].Rect().anchoredPosition = new Vector2(rectTransform.anchoredPosition.x, 45f);
27 }
28 chara = ELayer.pc;
29 Instance = this;
30 Rebuild();
31 }
Definition: ELayer.cs:4
static Chara pc
Definition: ELayer.cs:15
static UI ui
Definition: ELayer.cs:21
static LayerEquip Instance
Definition: LayerEquip.cs:5
Chara chara
Definition: LayerEquip.cs:13
void Rebuild()
Definition: LayerEquip.cs:33
List< Window > windows
Definition: Layer.cs:116
Definition: Window.cs:13
static Dictionary< string, SaveData > dictData
Definition: Window.cs:594

References chara, Window.dictData, Instance, ELayer.pc, Rebuild(), ELayer.ui, and Layer.windows.

◆ Rebuild()

void LayerEquip.Rebuild ( )
inline

Definition at line 33 of file LayerEquip.cs.

34 {
36 RefreshEquipment(listEtc, etc: true);
38 windows[0].RebuildLayout(recursive: true);
39 dirty = true;
40 }
UIList listMain
Definition: LayerEquip.cs:9
void RefreshToolBelt(bool rebuildLayout=false)
Definition: LayerEquip.cs:49
UIList listEtc
Definition: LayerEquip.cs:11
static bool dirty
Definition: LayerEquip.cs:7
void RefreshEquipment(UIList list, bool etc=false)
Definition: LayerEquip.cs:53

References dirty, listEtc, listMain, RefreshEquipment(), RefreshToolBelt(), and Layer.windows.

Referenced by OnInit().

◆ Redraw()

void LayerEquip.Redraw ( )
inline

Definition at line 42 of file LayerEquip.cs.

43 {
44 dirty = false;
47 }
override void Redraw()
Definition: UIList.cs:740

References dirty, listEtc, listMain, and UIList.Redraw().

◆ RefreshEquipment()

void LayerEquip.RefreshEquipment ( UIList  list,
bool  etc = false 
)
inline

Definition at line 53 of file LayerEquip.cs.

54 {
55 list.Clear();
56 list.callbacks = new UIList.Callback<BodySlot, ButtonGridDrag>
57 {
58 onInstantiate = delegate(BodySlot a, ButtonGridDrag b)
59 {
60 b.SetBodySlot(a, new InvOwnerEquip(chara, a), showIndex: true);
61 },
62 onRedraw = delegate(BodySlot a, ButtonGridDrag b, int i)
63 {
64 b.SetBodySlot(a, new InvOwnerEquip(chara, a), showIndex: true);
65 },
66 onSort = (BodySlot a, UIList.SortMode b) => chara.body.GetSortVal(a),
67 onList = delegate
68 {
69 foreach (BodySlot slot in chara.body.slots)
70 {
71 if (slot.elementId != 44)
72 {
73 if (slot.elementId == 36 || slot.elementId == 31 || slot.elementId == 37 || slot.elementId == 45)
74 {
75 if (!etc)
76 {
77 continue;
78 }
79 }
80 else if (etc)
81 {
82 continue;
83 }
84 list.Add(slot);
85 }
86 }
87 }
88 };
89 list.sortMode = UIList.SortMode.ByNumber;
90 list.List();
91 }
int elementId
Definition: BodySlot.cs:6
void SetBodySlot(BodySlot b, InvOwner owner, bool showIndex=false)
Definition: ButtonGrid.cs:121
List< BodySlot > slots
Definition: CharaBody.cs:8
int GetSortVal(BodySlot slot)
Definition: CharaBody.cs:470
CharaBody body
Definition: Chara.cs:91
Definition: UIList.cs:9
override void Clear()
Definition: UIList.cs:349
SortMode
Definition: UIList.cs:27
override void Add(object item)
Definition: UIList.cs:302
override void List()
Definition: UIList.cs:717

References UIList.Add(), Chara.body, chara, UIList.Clear(), BodySlot.elementId, CharaBody.GetSortVal(), UIList.List(), ButtonGrid.SetBodySlot(), and CharaBody.slots.

Referenced by Rebuild().

◆ RefreshToolBelt()

void LayerEquip.RefreshToolBelt ( bool  rebuildLayout = false)
inline

Definition at line 49 of file LayerEquip.cs.

50 {
51 }

Referenced by Rebuild().

◆ SetDirty()

static void LayerEquip.SetDirty ( )
inlinestatic

Definition at line 15 of file LayerEquip.cs.

16 {
17 dirty = true;
18 }

References dirty.

Member Data Documentation

◆ chara

Chara LayerEquip.chara

Definition at line 13 of file LayerEquip.cs.

Referenced by OnInit(), and RefreshEquipment().

◆ dirty

bool LayerEquip.dirty
static

Definition at line 7 of file LayerEquip.cs.

Referenced by Rebuild(), Redraw(), and SetDirty().

◆ Instance

LayerEquip LayerEquip.Instance
static

Definition at line 5 of file LayerEquip.cs.

Referenced by OnInit().

◆ listEtc

UIList LayerEquip.listEtc

Definition at line 11 of file LayerEquip.cs.

Referenced by Rebuild(), and Redraw().

◆ listMain

UIList LayerEquip.listMain

Definition at line 9 of file LayerEquip.cs.

Referenced by Rebuild(), and Redraw().


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