Elin Decompiled Documentation EA 23.253 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]
 

Private Member Functions

void Move (BaseModPackage p, ItemMod b, int a)
 

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

◆ Move()

void LayerMod.Move ( BaseModPackage  p,
ItemMod  b,
int  a 
)
inlineprivate

Definition at line 17 of file LayerMod.cs.

18 {
19 List<BaseModPackage> packages = ELayer.core.mods.packages;
20 int num = packages.IndexOf(p);
21 if (num + a < 0 || num + a >= packages.Count || packages[num + a].builtin)
22 {
23 SE.BeepSmall();
24 return;
25 }
26 packages.Move(p, a);
27 SE.Tab();
28 textRestart.SetActive(enable: true);
30 list.List();
31 }
List< BaseModPackage > packages
ModManager mods
Definition: Core.cs:39
Definition: ELayer.cs:4
static Core core
Definition: ELayer.cs:7
UIList list
Definition: LayerMod.cs:7
UIText textRestart
Definition: LayerMod.cs:11
void SaveLoadOrder()
Definition: ModManager.cs:218
override void List()
Definition: UIList.cs:768

References ELayer.core, list, UIList.List(), Core.mods, BaseModManager.packages, ModManager.SaveLoadOrder(), and textRestart.

Referenced by OnInit().

◆ OnInit()

override void LayerMod.OnInit ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 33 of file LayerMod.cs.

34 {
35 textRestart.SetActive(enable: false);
37 {
38 ELayer.config.other.disableMods = on;
40 textRestart.SetActive(enable: true);
41 });
42 Instance = this;
43 list.dragScrollView = GetComponentInChildren<UIScrollView>();
44 list.dragViewport = windows[0].Rect();
45 list.dragEdgeSize = 34f;
46 UIList uIList = list;
47 UIList uIList2 = list2;
49 {
50 onClick = delegate
51 {
52 },
53 onInstantiate = delegate(BaseModPackage a, ItemMod b)
54 {
55 a.UpdateMeta(updateOnly: true);
56 b.package = a;
57 string s = ELayer.core.mods.packages.IndexOf(a) + 1 + ". " + (a.isInPackages ? "[Local] " : "") + a.title;
58 b.buttonActivate.mainText.SetText(s, (!a.IsValidVersion()) ? FontColor.Bad : (a.activated ? FontColor.ButtonGeneral : FontColor.Passive));
59 b.buttonActivate.subText.text = a.version;
60 b.buttonLock.mainText.text = a.author;
61 b.buttonUp.SetActive(!a.builtin);
62 b.buttonDown.SetActive(!a.builtin);
64 b.buttonUp.SetOnClick(delegate
65 {
66 Move(a, b, -1);
67 });
68 b.buttonDown.SetOnClick(delegate
69 {
70 Move(a, b, 1);
71 });
73 bt.SetOnClick(delegate
74 {
75 a.willActivate = !a.willActivate;
78 textRestart.SetActive(enable: true);
79 });
80 bt.interactable = !a.builtin;
81 b.buttonActivate.onClick.AddListener(delegate
82 {
83 Refresh();
84 UIContextMenu uIContextMenu = ELayer.ui.CreateContextMenuInteraction();
86 {
87 uIContextMenu.AddButton("mod_publish", delegate
88 {
89 Core.TryWarnUpload(delegate
90 {
91 Dialog.YesNo("mod_publish_warn".lang(a.title, a.id, a.author), delegate
92 {
93 ELayer.core.steam.CreateUserContent(a);
94 });
95 });
96 });
97 }
98 if (!a.builtin)
99 {
100 uIContextMenu.AddButton(a.willActivate ? "mod_deactivate" : "mod_activate", delegate
101 {
102 SE.Click();
103 a.willActivate = !a.willActivate;
104 ELayer.core.mods.SaveLoadOrder();
105 list.List();
106 textRestart.SetActive(enable: true);
107 });
108 }
109 uIContextMenu.AddButton("mod_info", delegate
110 {
111 SE.Click();
112 Util.ShowExplorer(a.dirInfo.FullName + "/package.xml");
113 });
114 uIContextMenu.Show();
115 });
116 b.buttonLock.onClick.AddListener(Refresh);
117 },
118 onList = delegate
119 {
120 foreach (BaseModPackage package in manager.packages)
121 {
122 if (package.builtin)
123 {
124 list2.Add(package);
125 }
126 else
127 {
128 list.Add(package);
129 }
130 }
131 },
132 onRefresh = Refresh,
133 onDragReorder = delegate(BaseModPackage p, int a)
134 {
136 manager.packages.Move(p, a);
137 SE.Tab();
138 textRestart.SetActive(enable: true);
140 list.List();
141 },
142 canDragReorder = (BaseModPackage p) => !p.builtin
143 };
144 UIList.ICallback callbacks = obj;
145 uIList2.callbacks = obj;
146 uIList.callbacks = callbacks;
147 list.List();
148 list2.List();
149 }
FontColor
Definition: FontColor.cs:2
static bool IsOffline
Definition: BaseCore.cs:9
virtual void FreezeScreen(float duration=0.3f)
Definition: BaseCore.cs:80
Version version
Definition: BaseCore.cs:17
static BaseCore Instance
Definition: BaseCore.cs:11
bool IsValidVersion()
DirectoryInfo dirInfo
void UpdateMeta(bool updateOnly=false)
void Save()
Definition: CoreConfig.cs:828
OtherSetting other
Definition: CoreConfig.cs:619
bool enable
Definition: CoreDebug.cs:286
Definition: Core.cs:14
static void TryWarnUpload(Action action)
Definition: Core.cs:835
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 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
ModManager manager
Definition: LayerMod.cs:15
void Move(BaseModPackage p, ItemMod b, int a)
Definition: LayerMod.cs:17
UIButton toggleDisableMods
Definition: LayerMod.cs:13
UIList list2
Definition: LayerMod.cs:9
void Refresh()
Definition: LayerMod.cs:151
static LayerMod Instance
Definition: LayerMod.cs:5
List< Window > windows
Definition: Layer.cs:116
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:353
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, BaseCore.FreezeScreen(), BaseModPackage.id, Instance, BaseCore.Instance, BaseModPackage.isInPackages, BaseCore.IsOffline, BaseModPackage.IsValidVersion(), list, UIList.List(), list2, UIButton.mainText, manager, Core.mods, Move(), 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, Layer.windows, and Dialog.YesNo().

◆ OnKill()

override void LayerMod.OnKill ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 155 of file LayerMod.cs.

156 {
158 }

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

◆ Refresh()

void LayerMod.Refresh ( )
inline

Definition at line 151 of file LayerMod.cs.

152 {
153 }

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 Move(), and 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 Move(), and 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: