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

Public Member Functions

override void OnInit ()
 
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
 
UIText textRestart
 
UIButton toggleDisableMods
 
- 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 LayerMod 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" }
 

Properties

ModManager manager [get]
 
- 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]
 

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
 

Detailed Description

Definition at line 3 of file LayerMod.cs.

Member Function Documentation

◆ OnInit()

override void LayerMod.OnInit ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 17 of file LayerMod.cs.

18 {
19 textRestart.SetActive(enable: false);
21 {
22 ELayer.config.other.disableMods = on;
24 textRestart.SetActive(enable: true);
25 });
26 Instance = this;
27 UIList uIList = list;
28 UIList uIList2 = list2;
30 {
31 onClick = delegate
32 {
33 },
34 onInstantiate = delegate(BaseModPackage a, ItemMod b)
35 {
36 a.UpdateMeta(updateOnly: true);
37 b.package = a;
38 string s = ELayer.core.mods.packages.IndexOf(a) + 1 + ". " + (a.isInPackages ? "[Local] " : "") + a.title;
39 b.buttonActivate.mainText.SetText(s, (!a.IsValidVersion()) ? FontColor.Bad : (a.activated ? FontColor.ButtonGeneral : FontColor.Passive));
40 b.buttonActivate.subText.text = a.version;
41 b.buttonLock.mainText.text = a.author;
42 b.buttonUp.SetActive(!a.builtin);
43 b.buttonDown.SetActive(!a.builtin);
45 b.buttonUp.SetOnClick(delegate
46 {
47 Move(a, b, -1);
48 });
49 b.buttonDown.SetOnClick(delegate
50 {
51 Move(a, b, 1);
52 });
54 bt.SetOnClick(delegate
55 {
56 a.willActivate = !a.willActivate;
59 textRestart.SetActive(enable: true);
60 });
61 bt.interactable = !a.builtin;
62 b.buttonActivate.onClick.AddListener(delegate
63 {
64 Refresh();
65 UIContextMenu uIContextMenu = ELayer.ui.CreateContextMenuInteraction();
67 {
68 uIContextMenu.AddButton("mod_publish", delegate
69 {
70 Core.TryWarnUpload(delegate
71 {
72 Dialog.YesNo("mod_publish_warn".lang(a.title, a.id, a.author), delegate
73 {
74 ELayer.core.steam.CreateUserContent(a);
75 });
76 });
77 });
78 }
79 if (!a.builtin)
80 {
81 uIContextMenu.AddButton(a.willActivate ? "mod_deactivate" : "mod_activate", delegate
82 {
83 SE.Click();
84 a.willActivate = !a.willActivate;
85 ELayer.core.mods.SaveLoadOrder();
86 list.List();
87 textRestart.SetActive(enable: true);
88 });
89 }
90 uIContextMenu.AddButton("mod_info", delegate
91 {
92 SE.Click();
93 Util.ShowExplorer(a.dirInfo.FullName + "/package.xml");
94 });
95 uIContextMenu.Show();
96 });
97 b.buttonLock.onClick.AddListener(delegate
98 {
99 Refresh();
100 });
101 },
102 onList = delegate
103 {
104 foreach (BaseModPackage package in manager.packages)
105 {
106 if (package.builtin)
107 {
108 list2.Add(package);
109 }
110 else
111 {
112 list.Add(package);
113 }
114 }
115 },
116 onRefresh = Refresh
117 };
118 UIList.ICallback callbacks = obj;
119 uIList2.callbacks = obj;
120 uIList.callbacks = callbacks;
121 list.List();
122 list2.List();
123 void Move(BaseModPackage p, ItemMod b, int a)
124 {
125 List<BaseModPackage> packages = ELayer.core.mods.packages;
126 int num = packages.IndexOf(p);
127 if (num + a < 0 || num + a >= packages.Count || packages[num + a].builtin)
128 {
129 SE.BeepSmall();
130 }
131 else
132 {
133 packages.Move(p, a);
134 SE.Tab();
135 textRestart.SetActive(enable: true);
137 list.List();
138 }
139 }
140 }
FontColor
Definition: FontColor.cs:2
static bool IsOffline
Definition: BaseCore.cs:9
Version version
Definition: BaseCore.cs:17
List< BaseModPackage > packages
bool IsValidVersion()
DirectoryInfo dirInfo
void UpdateMeta(bool updateOnly=false)
void Save()
Definition: CoreConfig.cs:811
OtherSetting other
Definition: CoreConfig.cs:606
bool enable
Definition: CoreDebug.cs:285
Definition: Core.cs:14
ModManager mods
Definition: Core.cs:39
static void TryWarnUpload(Action action)
Definition: Core.cs:827
Definition: Dialog.cs:7
static Dialog YesNo(string langDetail, Action actionYes, Action actionNo=null, string langYes="yes", string langNo="no")
Definition: Dialog.cs:244
Definition: ELayer.cs:4
static Core core
Definition: ELayer.cs:7
static CoreDebug debug
Definition: ELayer.cs:43
static CoreConfig config
Definition: ELayer.cs:31
static UI ui
Definition: ELayer.cs:21
UIButton buttonActivate
Definition: ItemMod.cs:5
UIButton buttonUp
Definition: ItemMod.cs:11
UIButton buttonToggle
Definition: ItemMod.cs:15
UIButton buttonDown
Definition: ItemMod.cs:13
UIButton buttonLock
Definition: ItemMod.cs:9
UIList list
Definition: LayerMod.cs:7
ModManager manager
Definition: LayerMod.cs:15
UIButton toggleDisableMods
Definition: LayerMod.cs:13
UIList list2
Definition: LayerMod.cs:9
UIText textRestart
Definition: LayerMod.cs:11
void Refresh()
Definition: LayerMod.cs:142
static LayerMod Instance
Definition: LayerMod.cs:5
void SaveLoadOrder()
Definition: ModManager.cs:217
UIText mainText
Definition: UIButton.cs:102
void SetToggle(bool isOn, Action< bool > onToggle=null)
Definition: UIButton.cs:341
void Show(UIItem i)
void AddButton(Func< string > funcText, UnityAction action=null)
Definition: UIList.cs:9
override void Add(object item)
Definition: UIList.cs:302
override void List()
Definition: UIList.cs:717
void SetText(string s)
Definition: UIText.cs:159
Definition: Util.cs:10
static void ShowExplorer(string itemPath, bool selectFirstFile=false)
Definition: Util.cs:228
bool demo
Definition: Version.cs:14

References UIList.Add(), UIContextMenu.AddButton(), BaseModPackage.author, BaseModPackage.builtin, ItemMod.buttonActivate, ItemMod.buttonDown, ItemMod.buttonLock, ItemMod.buttonToggle, ItemMod.buttonUp, ELayer.config, ELayer.core, ELayer.debug, Version.demo, BaseModPackage.dirInfo, CoreConfig.OtherSetting.disableMods, CoreDebug.enable, BaseModPackage.id, Instance, BaseModPackage.isInPackages, BaseCore.IsOffline, BaseModPackage.IsValidVersion(), list, UIList.List(), list2, UIButton.mainText, manager, Core.mods, CoreConfig.other, BaseModManager.packages, Refresh(), CoreConfig.Save(), ModManager.SaveLoadOrder(), UIText.SetText(), UIButton.SetToggle(), UIContextMenu.Show(), textRestart, BaseModPackage.title, toggleDisableMods, Core.TryWarnUpload(), ELayer.ui, BaseModPackage.UpdateMeta(), Util, BaseCore.version, BaseModPackage.version, BaseModPackage.willActivate, and Dialog.YesNo().

◆ OnKill()

override void LayerMod.OnKill ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 146 of file LayerMod.cs.

147 {
149 }

References ELayer.core, Core.mods, and ModManager.SaveLoadOrder().

◆ Refresh()

void LayerMod.Refresh ( )
inline

Definition at line 142 of file LayerMod.cs.

143 {
144 }

Referenced by OnInit().

Member Data Documentation

◆ Instance

LayerMod LayerMod.Instance
static

Definition at line 5 of file LayerMod.cs.

Referenced by OnInit().

◆ list

UIList LayerMod.list

Definition at line 7 of file LayerMod.cs.

Referenced by OnInit().

◆ list2

UIList LayerMod.list2

Definition at line 9 of file LayerMod.cs.

Referenced by OnInit().

◆ textRestart

UIText LayerMod.textRestart

Definition at line 11 of file LayerMod.cs.

Referenced by OnInit().

◆ toggleDisableMods

UIButton LayerMod.toggleDisableMods

Definition at line 13 of file LayerMod.cs.

Referenced by OnInit().

Property Documentation

◆ manager

ModManager LayerMod.manager
get

Definition at line 15 of file LayerMod.cs.

Referenced by OnInit().


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