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

Public Member Functions

override void OnInit ()
 
override void OnUpdateInput ()
 
void Refresh ()
 
override void OnKill ()
 
- 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 ()
 

Public Attributes

UIList list
 
UIList list2
 
- 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 LayerWidget Instance
 
- 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

- 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)
 
- 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 LayerWidget.cs.

Member Function Documentation

◆ OnInit()

override void LayerWidget.OnInit ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 11 of file LayerWidget.cs.

12 {
13 ELayer.ui.HideFloats();
14 WidgetManager widgets = ELayer.ui.widgets;
15 Instance = this;
16 UIList uIList = list;
17 UIList uIList2 = list2;
19 {
20 onClick = delegate
21 {
22 },
23 onInstantiate = delegate(Widget.Config a, ItemWidget b)
24 {
25 b.buttonActivate.mainText.text = Lang.Get("Widget" + a.id);
26 b.buttonActivate.subText.SetActive(a.IsSystem);
27 b.buttonActivate.onClick.AddListener(delegate
28 {
29 if (a.IsSealed)
30 {
31 SE.Beep();
32 }
33 else
34 {
35 if (a.id == "QuestTracker")
36 {
37 if (ELayer.ui.widgets.GetWidget("QuestTracker") != null)
38 {
39 ELayer.player.questTracker = false;
40 }
41 else
42 {
43 ELayer.player.questTracker = true;
44 }
45 WidgetHotbar.RefreshButtons();
46 }
47 widgets.Toggle(a)?.SoundActivate();
48 Refresh();
49 }
50 });
51 b.buttonLock.onClick.AddListener(delegate
52 {
53 widgets.ToggleLock(a);
54 Refresh();
55 });
56 b.config = a;
57 },
58 onRefresh = Refresh
59 };
60 UIList.ICallback callbacks = obj;
61 uIList2.callbacks = obj;
62 uIList.callbacks = callbacks;
63 foreach (Widget.Meta widgetMeta in ELayer.setting.ui.widgetMetas)
64 {
65 Widget.Config config = widgets.configs[widgetMeta.id];
66 if (config.IsInRightMode() && !widgetMeta.debugOnly)
67 {
68 if (config.id.Contains("Hotbar"))
69 {
71 }
72 else
73 {
75 }
76 }
77 }
78 list.Refresh();
79 list2.Refresh();
80 foreach (Widget item in widgets.list)
81 {
82 item.OnManagerActivate();
83 }
84 windows[0].AddBottomSpace();
85 windows[0].AddBottomButton("resetWidget", delegate
86 {
87 Dialog.YesNo("dialogResetWidget", delegate
88 {
89 Close();
91 ELayer.ui.widgets.Reset(toggleTheme: false);
92 ELayer.ui.AddLayer<LayerWidget>();
93 });
94 });
95 windows[0].AddBottomButton("loadTheme", delegate
96 {
97 widgets.DialogLoad(delegate
98 {
99 Close();
100 ELayer.ui.AddLayer<LayerWidget>();
101 });
102 });
103 windows[0].AddBottomButton("saveTheme", delegate
104 {
105 widgets.DialogSave(delegate
106 {
107 Dialog.Ok("dialogSaveTheme");
108 });
109 });
110 }
Definition: Dialog.cs:7
static Dialog YesNo(string langDetail, Action actionYes, Action actionNo=null, string langYes="yes", string langNo="no")
Definition: Dialog.cs:244
static Dialog Ok(string langDetail, Action action=null)
Definition: Dialog.cs:222
Definition: ELayer.cs:4
static Player player
Definition: ELayer.cs:13
static CoreConfig config
Definition: ELayer.cs:31
static GameSetting setting
Definition: ELayer.cs:33
static UI ui
Definition: ELayer.cs:21
List< Widget.Meta > widgetMetas
Definition: GameSetting.cs:26
UISetting ui
Definition: GameSetting.cs:307
UIButton buttonActivate
Definition: ItemWidget.cs:5
UIButton buttonLock
Definition: ItemWidget.cs:9
Definition: Lang.cs:6
static string Get(string id)
Definition: Lang.cs:91
void Refresh()
Definition: LayerWidget.cs:124
static LayerWidget Instance
Definition: LayerWidget.cs:5
UIList list
Definition: LayerWidget.cs:7
UIList list2
Definition: LayerWidget.cs:9
List< Window > windows
Definition: Layer.cs:116
virtual void Close()
Definition: Layer.cs:463
bool useSubWidgetTheme
Definition: Player.cs:781
UIText subText
Definition: UIButton.cs:104
Definition: UIList.cs:9
override void Add(object item)
Definition: UIList.cs:302
virtual void Refresh(bool highlightLast=false)
Definition: UIList.cs:424
void DialogLoad(Action onLoad=null)
void ToggleLock(Widget.Config c)
void DialogSave(Action onSave=null)
Dictionary< string, Widget.Config > configs
List< Widget > list
Widget Toggle(string id)
Definition: Widget.cs:7
void SoundActivate()
Definition: Widget.cs:728

References ItemWidget.buttonActivate, ItemWidget.buttonLock, Lang.Get(), Instance, list, list2, Refresh(), Widget.SoundActivate(), UIButton.subText, WidgetManager.Toggle(), WidgetManager.ToggleLock(), and ELayer.ui.

◆ OnKill()

override void LayerWidget.OnKill ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 135 of file LayerWidget.cs.

136 {
137 foreach (Widget item in ELayer.ui.widgets.list)
138 {
139 item.OnManagerDeactivate();
140 }
141 ELayer.ui.ShowFloats();
142 }

References item, and ELayer.ui.

◆ OnUpdateInput()

override void LayerWidget.OnUpdateInput ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 112 of file LayerWidget.cs.

113 {
115 {
116 Widget componentOf = InputModuleEX.GetComponentOf<Widget>();
117 if ((bool)componentOf)
118 {
119 componentOf.ShowContextMenu();
120 }
121 }
122 }
bool dragging
Definition: ButtonState.cs:43
bool clicked
Definition: ButtonState.cs:37
Definition: EInput.cs:8
static ButtonState leftMouse
Definition: EInput.cs:349
void ShowContextMenu()
Definition: Widget.cs:601

References ButtonState.clicked, ButtonState.dragging, EInput.leftMouse, and Widget.ShowContextMenu().

◆ Refresh()

void LayerWidget.Refresh ( )
inline

Definition at line 124 of file LayerWidget.cs.

125 {
126 foreach (UIList.ButtonPair item in list.buttons.Concat(list2.buttons))
127 {
128 ItemWidget itemWidget = item.component as ItemWidget;
129 itemWidget.imageLock.SetActive(itemWidget.config.locked);
130 itemWidget.imageActive.SetActive(itemWidget.config.state == Widget.State.Active);
131 itemWidget.buttonLock.mainText.text = Lang.Get(itemWidget.config.locked ? "unlockWidget" : "lockWidget");
132 }
133 }
Image imageLock
Definition: ItemWidget.cs:13
Widget.Config config
Definition: ItemWidget.cs:15
Image imageActive
Definition: ItemWidget.cs:11
List< ButtonPair > buttons
Definition: UIList.cs:244
State
Definition: Widget.cs:141

References UIList.buttons, ItemWidget.config, Lang.Get(), ItemWidget.imageActive, ItemWidget.imageLock, and item.

Referenced by WidgetManager.DeactivateWidget(), and OnInit().

Member Data Documentation

◆ Instance

LayerWidget LayerWidget.Instance
static

◆ list

UIList LayerWidget.list

Definition at line 7 of file LayerWidget.cs.

Referenced by OnInit().

◆ list2

UIList LayerWidget.list2

Definition at line 9 of file LayerWidget.cs.

Referenced by OnInit().


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