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

Classes

class  Item
 
class  Page
 

Public Types

enum  Mode {
  Map , Inventory , EloMap , Area ,
  Custom
}
 

Public Member Functions

override void OnInit ()
 
override void OnKill ()
 
override void OnUpdateInput ()
 
void Show (List< Page > _pages, Mode _mode)
 
void ShowPage (int index)
 
void ShowPage (Page page)
 
void Reload ()
 
- 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 Show (IInspect newTarget)
 
static bool TryShow (bool quick)
 
static Page GetPage (IInspect o)
 
- 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

Mode mode
 
Point point
 
List< Pagepages = new List<Page>()
 
InteractionMenu menu
 
WindowChara windowChara
 
- 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 LayerInteraction Instance
 
static IInspect Target
 
- 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" }
 

Private Member Functions

void Update ()
 

Private Attributes

bool first = true
 

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 5 of file LayerInteraction.cs.

Member Enumeration Documentation

◆ Mode

Enumerator
Map 
Inventory 
EloMap 
Area 
Custom 

Definition at line 7 of file LayerInteraction.cs.

Member Function Documentation

◆ GetPage()

static Page LayerInteraction.GetPage ( IInspect  o)
inlinestatic

Definition at line 142 of file LayerInteraction.cs.

143 {
144 Page page = new Page();
145 _ = page.items;
146 if (o is Area)
147 {
148 Area area = o as Area;
149 page.area = area;
150 }
151 else if (o is Chara)
152 {
153 Chara t2 = o as Chara;
154 string text = "charaInfo".lang();
155 if (!t2.IsHomeMember())
156 {
157 text = text + "(" + "unidentified".lang() + ")";
158 }
159 if (t2.IsHomeMember())
160 {
161 page.Add(t2, "tTalk".lang(), "", delegate
162 {
163 t2.ShowDialog();
164 });
165 }
166 else
167 {
168 page.Add(t2, text, "", delegate
169 {
170 if (!t2.IsHomeMember())
171 {
172 SE.Beep();
173 }
174 });
175 }
176 }
177 else if (o is Thing)
178 {
179 Thing t = o as Thing;
180 page.Add(t, "objInfo", "", delegate
181 {
182 ELayer.ui.AddLayer<LayerInfo>().Set(t);
183 });
184 if (t.trait is TraitQuestBoard)
185 {
186 page.Add(t, "quest", "", delegate
187 {
188 ELayer.ui.AddLayer<LayerQuestBoard>();
189 }, 20, auto: true);
190 page.Add(t, "hire", "", delegate
191 {
192 ELayer.ui.AddLayer<LayerHire>();
193 }, 20, auto: true);
194 }
195 if (t.trait is TraitGacha)
196 {
197 page.Add(t, "gacha", "", delegate
198 {
199 ELayer.ui.AddLayer<LayerGacha>();
200 }, 10, auto: true);
201 }
202 if (t.trait.IsFactory)
203 {
204 page.Add(t, "craft", "icon_Inspect", delegate
205 {
206 ELayer.ui.AddLayer<LayerCraft>().SetFactory(t);
207 }, 100, auto: true);
208 }
209 if (t.IsInstalled)
210 {
211 page.Add(t, "move", "", delegate
212 {
214 });
215 }
216 }
217 return page;
218 }
void Activate(Thing t)
static AM_Inspect Inspect
Definition: ActionMode.cs:23
Definition: Area.cs:4
Trait trait
Definition: Card.cs:49
bool IsInstalled
Definition: Card.cs:2241
Thing Add(string id, int num=1, int lv=1)
Definition: Card.cs:2878
Definition: Chara.cs:10
void ShowDialog()
Definition: Chara.cs:6368
bool IsHomeMember()
Definition: Chara.cs:5942
Definition: ELayer.cs:4
static UI ui
Definition: ELayer.cs:21
Definition: Thing.cs:8
virtual bool IsFactory
Definition: Trait.cs:135

References AM_MoveInstalled.Activate(), LayerInteraction.Page.Add(), Area, ActionMode.Inspect, Trait.IsFactory, Chara.IsHomeMember(), Card.IsInstalled, LayerInteraction.Page.items, Chara.ShowDialog(), Card.trait, and ELayer.ui.

Referenced by Show().

◆ OnInit()

override void LayerInteraction.OnInit ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 95 of file LayerInteraction.cs.

96 {
97 Instance = this;
98 first = true;
99 }
static LayerInteraction Instance

References first, and Instance.

◆ OnKill()

override void LayerInteraction.OnKill ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 101 of file LayerInteraction.cs.

102 {
103 Target = null;
104 }
static IInspect Target

References Target.

◆ OnUpdateInput()

override void LayerInteraction.OnUpdateInput ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 118 of file LayerInteraction.cs.

119 {
120 }

◆ Reload()

void LayerInteraction.Reload ( )
inline

Definition at line 293 of file LayerInteraction.cs.

294 {
295 }

◆ Show() [1/2]

static void LayerInteraction.Show ( IInspect  newTarget)
inlinestatic

Definition at line 122 of file LayerInteraction.cs.

123 {
124 if (Target != newTarget)
125 {
126 Target = newTarget;
127 Page page = GetPage(Target);
128 ((Instance != null) ? Instance : ELayer.ui.AddLayer<LayerInteraction>()).ShowPage(page);
129 }
130 }
void ShowPage(int index)
static Page GetPage(IInspect o)

References GetPage(), Instance, ShowPage(), Target, and ELayer.ui.

Referenced by TryShow().

◆ Show() [2/2]

void LayerInteraction.Show ( List< Page _pages,
Mode  _mode 
)
inline

Definition at line 220 of file LayerInteraction.cs.

221 {
222 pages = _pages;
223 mode = _mode;
224 switch (mode)
225 {
226 case Mode.Map:
228 break;
229 case Mode.EloMap:
230 {
231 Page page = new Page();
232 pages = new List<Page>();
233 pages.Add(page);
234 page.Add(null, "test1", "", delegate
235 {
236 });
237 page.Add(null, "test2", "", delegate
238 {
239 });
240 break;
241 }
242 }
243 foreach (Page page2 in pages)
244 {
245 ButtonGrid buttonGrid = (ButtonGrid)(page2.button = menu.Add() as ButtonGrid);
246 buttonGrid.SetObject(page2.items[0].target);
247 Page _page = page2;
248 buttonGrid.onClick.AddListener(delegate
249 {
250 ShowPage(_page);
251 SE.Click();
252 });
253 buttonGrid.RebuildLayout(recursive: true);
254 }
255 menu.Show();
256 ShowPage(0);
257 }
void SetObject(object o)
Definition: ButtonGrid.cs:405
InteractionMenu menu
List< Page > pages
Point Set(int _x, int _z)
Definition: Point.cs:479
Definition: Scene.cs:8
static Point HitPoint
Definition: Scene.cs:21

References InteractionMenu.Add(), LayerInteraction.Page.Add(), LayerInteraction.Page.button, Scene.HitPoint, LayerInteraction.Page.items, menu, mode, pages, point, Point.Set(), ButtonGrid.SetObject(), InteractionMenu.Show(), and ShowPage().

◆ ShowPage() [1/2]

void LayerInteraction.ShowPage ( int  index)
inline

Definition at line 259 of file LayerInteraction.cs.

260 {
261 ShowPage(pages[index]);
262 }

References pages, and ShowPage().

Referenced by Show(), and ShowPage().

◆ ShowPage() [2/2]

void LayerInteraction.ShowPage ( Page  page)
inline

Definition at line 264 of file LayerInteraction.cs.

265 {
266 menu.Clear();
267 foreach (Item item in page.items)
268 {
269 UIButton uIButton = menu.Add();
270 uIButton.icon.sprite = SpriteSheet.Get(item.idSprite.IsEmpty("icon_" + item.text)) ?? uIButton.icon.sprite;
271 uIButton.mainText.SetText((item.textFunc != null) ? item.textFunc() : item.text.lang());
272 uIButton.onClick.AddListener(delegate
273 {
274 item.action();
275 if (item.reload)
276 {
277 Reload();
278 ShowPage(page);
279 }
280 });
281 uIButton.RebuildLayout(recursive: true);
282 }
283 Chara chara = Target as Chara;
284 bool flag = chara?.IsHomeMember() ?? false;
285 windowChara.SetActive(flag);
286 if (flag)
287 {
288 windowChara.SetChara(chara);
289 }
290 menu.Show();
291 }
WindowChara windowChara
static Sprite Get(string id)
Definition: SpriteSheet.cs:28
Image icon
Definition: UIButton.cs:110
UIText mainText
Definition: UIButton.cs:102
void SetText(string s)
Definition: UIText.cs:159
void SetChara(Chara c)
Definition: WindowChara.cs:163

References InteractionMenu.Add(), InteractionMenu.Clear(), SpriteSheet.Get(), UIButton.icon, Chara.IsHomeMember(), item, UIButton.mainText, menu, WindowChara.SetChara(), UIText.SetText(), InteractionMenu.Show(), Target, and windowChara.

◆ TryShow()

static bool LayerInteraction.TryShow ( bool  quick)
inlinestatic

Definition at line 132 of file LayerInteraction.cs.

133 {
135 {
136 return false;
137 }
139 return true;
140 }
static Scene scene
Definition: ELayer.cs:27
static void Show(IInspect newTarget)
List< IInspect > ListInspectorTargets()
Definition: Point.cs:1316
bool IsValid
Definition: Point.cs:88
PointTarget mouseTarget
Definition: Scene.cs:129

References Scene.HitPoint, Point.IsValid, Point.ListInspectorTargets(), Scene.mouseTarget, PointTarget.pos, ELayer.scene, Show(), and Target.

◆ Update()

void LayerInteraction.Update ( )
inlineprivate

Definition at line 106 of file LayerInteraction.cs.

107 {
108 if (mode == Mode.Map)
109 {
111 MeshPass obj = ((point.HasBlock || point.cell.liquidLv > 0) ? ELayer.screen.guide.passGuideBlock : ELayer.screen.guide.passGuideFloor);
112 int num = 0;
113 Vector3 vector = point.Position();
114 obj.Add(vector.x, vector.y, vector.z, num, 0.3f);
115 }
116 }
ScreenGuide guide
BaseTileSelector tileSelector
static BaseGameScreen screen
Definition: ELayer.cs:29
void Add(Point point, float tile=0f, float color=0f)
Definition: MeshPass.cs:122
ref Vector3 Position(int height)
Definition: Point.cs:524
MeshPass passGuideBlock
Definition: ScreenGuide.cs:5
MeshPass passGuideFloor
Definition: ScreenGuide.cs:7

References MeshPass.Add(), BaseGameScreen.guide, mode, ScreenGuide.passGuideBlock, ScreenGuide.passGuideFloor, point, Point.Position(), ELayer.screen, and BaseGameScreen.tileSelector.

Member Data Documentation

◆ first

bool LayerInteraction.first = true
private

Definition at line 89 of file LayerInteraction.cs.

Referenced by OnInit().

◆ Instance

LayerInteraction LayerInteraction.Instance
static

Definition at line 79 of file LayerInteraction.cs.

Referenced by OnInit(), and Show().

◆ menu

InteractionMenu LayerInteraction.menu

Definition at line 91 of file LayerInteraction.cs.

Referenced by Show(), and ShowPage().

◆ mode

Mode LayerInteraction.mode

Definition at line 83 of file LayerInteraction.cs.

Referenced by Show(), and Update().

◆ pages

List<Page> LayerInteraction.pages = new List<Page>()

Definition at line 87 of file LayerInteraction.cs.

Referenced by Show(), and ShowPage().

◆ point

Point LayerInteraction.point

Definition at line 85 of file LayerInteraction.cs.

Referenced by Show(), and Update().

◆ Target

IInspect LayerInteraction.Target
static

Definition at line 81 of file LayerInteraction.cs.

Referenced by OnKill(), Show(), ShowPage(), and TryShow().

◆ windowChara

WindowChara LayerInteraction.windowChara

Definition at line 93 of file LayerInteraction.cs.

Referenced by ShowPage().


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