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

Classes

class  MenuItem
 

Public Member Functions

void SetItems (List< Thing > things)
 
void SetItemsOnHitPoint ()
 
override void OnUpdateInput ()
 
void Refresh ()
 
- 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 MenuItem GetItem (Card t)
 
static List< MenuItemGetMenuItems ()
 
- 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

bool inspectMap
 
UIList list
 
List< MenuItemitems = new List<MenuItem>()
 
- 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
 

Additional Inherited Members

- 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" }
 
- 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 5 of file LayerInspect.cs.

Member Function Documentation

◆ GetItem()

static MenuItem LayerInspect.GetItem ( Card  t)
inlinestatic

Definition at line 93 of file LayerInspect.cs.

94 {
95 return new MenuItem
96 {
97 card = t,
98 text = t.Name,
99 action = delegate
100 {
101 if (t.isChara)
102 {
103 ELayer.ui.AddLayer<LayerChara>().SetChara(t.Chara);
104 }
105 else
106 {
107 ELayer.ui.AddLayer<LayerInfo>().Set(t);
108 }
109 }
110 };
111 }
virtual Chara Chara
Definition: Card.cs:1946
string Name
Definition: Card.cs:2013
virtual bool isChara
Definition: Card.cs:1959
Definition: ELayer.cs:4
static UI ui
Definition: ELayer.cs:21

References card, Card.Chara, Card.isChara, Card.Name, and ELayer.ui.

Referenced by GetMenuItems(), and SetItems().

◆ GetMenuItems()

static List< MenuItem > LayerInspect.GetMenuItems ( )
inlinestatic

Definition at line 113 of file LayerInspect.cs.

114 {
115 List<MenuItem> list = new List<MenuItem>();
116 Point point = Scene.HitPoint.Copy();
117 if (!point.IsValid)
118 {
119 return list;
120 }
121 foreach (Card item in point.ListCards())
122 {
123 if (item.isSynced)
124 {
126 }
127 }
128 if (point.area != null)
129 {
130 list.Add(new MenuItem
131 {
132 text = point.area.Name,
133 action = delegate
134 {
135 }
136 });
137 }
138 if (point.cell.HasLiquid)
139 {
140 list.Add(new MenuItem
141 {
142 text = point.cell.GetLiquidName(),
143 action = delegate
144 {
145 ELayer.ui.AddLayer<LayerInfo>().SetLiquid(point.cell);
146 },
147 renderRow = point.cell.sourceEffect
148 });
149 }
150 if (point.matBlock.id != 0)
151 {
152 list.Add(new MenuItem
153 {
154 text = point.cell.GetBlockName(),
155 action = delegate
156 {
157 ELayer.ui.AddLayer<LayerInfo>().SetBlock(point.cell);
158 },
159 renderRow = point.cell.sourceBlock
160 });
161 }
162 if (point.matFloor.id != 0)
163 {
164 list.Add(new MenuItem
165 {
166 text = point.cell.GetFloorName(),
167 action = delegate
168 {
169 ELayer.ui.AddLayer<LayerInfo>().SetFloor(point.cell);
170 },
171 renderRow = point.cell.sourceFloor
172 });
173 }
174 if (point.cell.obj != 0)
175 {
176 list.Add(new MenuItem
177 {
178 text = point.sourceObj.GetName(),
179 action = delegate
180 {
181 ELayer.ui.AddLayer<LayerInfo>().SetObj(point.cell);
182 },
183 renderRow = point.cell.sourceObj
184 });
185 }
186 return list;
187 }
virtual string Name
Definition: BaseArea.cs:37
Definition: Card.cs:11
bool HasLiquid
Definition: Cell.cs:673
string GetFloorName()
Definition: Cell.cs:1590
byte obj
Definition: Cell.cs:38
string GetBlockName()
Definition: Cell.cs:1585
string GetLiquidName()
Definition: Cell.cs:1644
static MenuItem GetItem(Card t)
Definition: LayerInspect.cs:93
Definition: Point.cs:9
SourceMaterial.Row matBlock
Definition: Point.cs:55
SourceMaterial.Row matFloor
Definition: Point.cs:57
List< Card > ListCards(bool includeMasked=false)
Definition: Point.cs:1015
Point Copy()
Definition: Point.cs:467
SourceObj.Row sourceObj
Definition: Point.cs:69
bool IsValid
Definition: Point.cs:88
Area area
Definition: Point.cs:73
Cell cell
Definition: Point.cs:51
Definition: Scene.cs:8
static Point HitPoint
Definition: Scene.cs:21
string GetName(int id)
Definition: SourceObj.cs:149
override void Add(object item)
Definition: UIList.cs:302

References UIList.Add(), Point.Copy(), GetItem(), Scene.HitPoint, Point.IsValid, item, list, and ELayer.ui.

Referenced by SetItemsOnHitPoint().

◆ OnUpdateInput()

override void LayerInspect.OnUpdateInput ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 42 of file LayerInspect.cs.

43 {
44 if (!inspectMap)
45 {
46 return;
47 }
48 if (Input.GetMouseButtonDown(0))
49 {
50 if (!ELayer.ui.isPointerOverUI && Scene.HitPoint.IsValid)
51 {
53 }
54 }
55 else
56 {
57 _ = Input.anyKeyDown;
58 }
59 }
void SetItemsOnHitPoint()
Definition: LayerInspect.cs:35

References Scene.HitPoint, inspectMap, Point.IsValid, SetItemsOnHitPoint(), and ELayer.ui.

◆ Refresh()

void LayerInspect.Refresh ( )
inline

Definition at line 61 of file LayerInspect.cs.

62 {
63 list.Clear();
64 list.callbacks = new UIList.Callback<MenuItem, ButtonGeneral>
65 {
66 onClick = delegate(MenuItem a, ButtonGeneral b)
67 {
68 if (a.action != null)
69 {
70 a.action();
71 }
72 },
73 onInstantiate = delegate(MenuItem a, ButtonGeneral b)
74 {
75 if (a.card != null)
76 {
77 b.SetCard(a.card);
78 }
79 else
80 {
81 b.mainText.text = a.text;
82 if (a.renderRow != null)
83 {
84 a.renderRow.SetImage(b.icon);
85 }
86 }
87 }
88 };
90 list.Refresh();
91 }
void SetCard(Card c, FontColor color=FontColor.Ignore)
Definition: ButtonGeneral.cs:9
List< MenuItem > items
Definition: LayerInspect.cs:24
Image icon
Definition: UIButton.cs:110
Definition: UIList.cs:9
override void Clear()
Definition: UIList.cs:349
void AddCollection(ICollection collection)
Definition: UIList.cs:294
virtual void Refresh(bool highlightLast=false)
Definition: UIList.cs:424

References LayerInspect.MenuItem.action, UIList.AddCollection(), LayerInspect.MenuItem.card, UIList.Clear(), UIButton.icon, items, list, UIList.Refresh(), LayerInspect.MenuItem.renderRow, ButtonGeneral.SetCard(), RenderRow.SetImage(), and LayerInspect.MenuItem.text.

Referenced by SetItems(), and SetItemsOnHitPoint().

◆ SetItems()

void LayerInspect.SetItems ( List< Thing things)
inline

Definition at line 26 of file LayerInspect.cs.

27 {
28 foreach (Thing thing in things)
29 {
30 items.Add(GetItem(thing));
31 }
32 Refresh();
33 }
void Refresh()
Definition: LayerInspect.cs:61
Definition: Thing.cs:8

References GetItem(), items, and Refresh().

◆ SetItemsOnHitPoint()

void LayerInspect.SetItemsOnHitPoint ( )
inline

Definition at line 35 of file LayerInspect.cs.

36 {
37 inspectMap = true;
39 Refresh();
40 }
static List< MenuItem > GetMenuItems()

References GetMenuItems(), inspectMap, items, and Refresh().

Referenced by OnUpdateInput().

Member Data Documentation

◆ inspectMap

bool LayerInspect.inspectMap

Definition at line 20 of file LayerInspect.cs.

Referenced by OnUpdateInput(), and SetItemsOnHitPoint().

◆ items

List<MenuItem> LayerInspect.items = new List<MenuItem>()

Definition at line 24 of file LayerInspect.cs.

Referenced by Refresh(), SetItems(), and SetItemsOnHitPoint().

◆ list

UIList LayerInspect.list

Definition at line 22 of file LayerInspect.cs.

Referenced by GetMenuItems(), and Refresh().


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