@@ -12,10 +12,14 @@ namespace UnityExplorer.Config
12
12
{
13
13
public static class ConfigManager
14
14
{
15
+ internal static readonly Dictionary < string , IConfigElement > ConfigElements = new ( ) ;
16
+ internal static readonly Dictionary < string , IConfigElement > InternalConfigs = new ( ) ;
17
+
15
18
// Each Mod Loader has its own ConfigHandler.
16
19
// See the UnityExplorer.Loader namespace for the implementations.
17
20
public static ConfigHandler Handler { get ; private set ; }
18
21
22
+ // Actual UE Settings
19
23
public static ConfigElement < KeyCode > Master_Toggle ;
20
24
public static ConfigElement < UIManager . VerticalAnchor > Main_Navbar_Anchor ;
21
25
public static ConfigElement < bool > Force_Unlock_Mouse ;
@@ -26,22 +30,18 @@ public static class ConfigManager
26
30
public static ConfigElement < bool > Log_Unity_Debug ;
27
31
public static ConfigElement < bool > Hide_On_Startup ;
28
32
public static ConfigElement < float > Startup_Delay_Time ;
29
-
30
33
public static ConfigElement < string > Reflection_Signature_Blacklist ;
31
34
32
35
// internal configs
33
36
internal static InternalConfigHandler InternalHandler { get ; private set ; }
37
+ internal static readonly Dictionary < UIManager . Panels , ConfigElement < string > > PanelSaveData = new ( ) ;
34
38
35
- public static ConfigElement < string > ObjectExplorerData ;
36
- public static ConfigElement < string > InspectorData ;
37
- public static ConfigElement < string > CSConsoleData ;
38
- public static ConfigElement < string > OptionsPanelData ;
39
- public static ConfigElement < string > ConsoleLogData ;
40
- public static ConfigElement < string > HookManagerData ;
41
- public static ConfigElement < string > ClipboardData ;
42
-
43
- internal static readonly Dictionary < string , IConfigElement > ConfigElements = new Dictionary < string , IConfigElement > ( ) ;
44
- internal static readonly Dictionary < string , IConfigElement > InternalConfigs = new Dictionary < string , IConfigElement > ( ) ;
39
+ internal static ConfigElement < string > GetPanelSaveData ( UIManager . Panels panel )
40
+ {
41
+ if ( ! PanelSaveData . ContainsKey ( panel ) )
42
+ PanelSaveData . Add ( panel , new ConfigElement < string > ( panel . ToString ( ) , string . Empty , string . Empty , true ) ) ;
43
+ return PanelSaveData [ panel ] ;
44
+ }
45
45
46
46
public static void Init ( ConfigHandler configHandler )
47
47
{
@@ -124,16 +124,6 @@ private static void CreateConfigElements()
124
124
"Seperate signatures with a semicolon ';'.\r \n " +
125
125
"For example, to blacklist Camera.main, you would add 'UnityEngine.Camera.main;'" ,
126
126
"" ) ;
127
-
128
- // Internal configs (panel save data)
129
-
130
- ObjectExplorerData = new ConfigElement < string > ( "ObjectExplorer" , "" , "" , true ) ;
131
- InspectorData = new ConfigElement < string > ( "Inspector" , "" , "" , true ) ;
132
- CSConsoleData = new ConfigElement < string > ( "CSConsole" , "" , "" , true ) ;
133
- OptionsPanelData = new ConfigElement < string > ( "OptionsPanel" , "" , "" , true ) ;
134
- ConsoleLogData = new ConfigElement < string > ( "ConsoleLog" , "" , "" , true ) ;
135
- HookManagerData = new ConfigElement < string > ( "HookManager" , "" , "" , true ) ;
136
- ClipboardData = new ConfigElement < string > ( "Clipboard" , "" , "" , true ) ;
137
127
}
138
128
}
139
129
}
0 commit comments