@@ -12,23 +12,25 @@ namespace UnityExplorer.Core.Config
12
12
{
13
13
public static class ConfigManager
14
14
{
15
- // Each Loader has its own ConfigHandler.
15
+ // Each Mod Loader has its own ConfigHandler.
16
16
// See the UnityExplorer.Loader namespace for the implementations.
17
- public static IConfigHandler Handler { get ; private set ; }
17
+ public static ConfigHandler Handler { get ; private set ; }
18
18
19
19
public static ConfigElement < KeyCode > Main_Menu_Toggle ;
20
+ public static ConfigElement < bool > Force_Unlock_Mouse ;
20
21
public static ConfigElement < int > Default_Page_Limit ;
21
22
public static ConfigElement < string > Default_Output_Path ;
22
23
public static ConfigElement < bool > Log_Unity_Debug ;
23
24
public static ConfigElement < bool > Hide_On_Startup ;
25
+
24
26
public static ConfigElement < string > Last_Window_Anchors ;
25
27
public static ConfigElement < int > Last_Active_Tab ;
26
28
public static ConfigElement < bool > Last_DebugConsole_State ;
27
29
public static ConfigElement < bool > Last_SceneExplorer_State ;
28
30
29
31
internal static readonly Dictionary < string , IConfigElement > ConfigElements = new Dictionary < string , IConfigElement > ( ) ;
30
32
31
- public static void Init ( IConfigHandler configHandler )
33
+ public static void Init ( ConfigHandler configHandler )
32
34
{
33
35
Handler = configHandler ;
34
36
Handler . Init ( ) ;
@@ -56,6 +58,11 @@ private static void CreateConfigElements()
56
58
KeyCode . F7 ,
57
59
false ) ;
58
60
61
+ Force_Unlock_Mouse = new ConfigElement < bool > ( "Force Unlock Mouse" ,
62
+ "Force the Cursor to be unlocked (visible) when the UnityExplorer menu is open." ,
63
+ true ,
64
+ false ) ;
65
+
59
66
Default_Page_Limit = new ConfigElement < int > ( "Default Page Limit" ,
60
67
"The default maximum number of elements per 'page' in UnityExplorer." ,
61
68
25 ,
@@ -102,25 +109,25 @@ private static void CreateConfigElements()
102
109
private static void PanelDragger_OnFinishResize ( RectTransform rect )
103
110
{
104
111
Last_Window_Anchors . Value = RectAnchorsToString ( rect ) ;
105
- Handler . SaveConfig ( ) ;
112
+ Handler . OnAnyConfigChanged ( ) ;
106
113
}
107
114
108
115
private static void MainMenu_OnActiveTabChanged ( int page )
109
116
{
110
117
Last_Active_Tab . Value = page ;
111
- Handler . SaveConfig ( ) ;
118
+ Handler . OnAnyConfigChanged ( ) ;
112
119
}
113
120
114
121
private static void DebugConsole_OnToggleShow ( bool showing )
115
122
{
116
123
Last_DebugConsole_State . Value = showing ;
117
- Handler . SaveConfig ( ) ;
124
+ Handler . OnAnyConfigChanged ( ) ;
118
125
}
119
126
120
127
private static void SceneExplorer_OnToggleShow ( bool showing )
121
128
{
122
129
Last_SceneExplorer_State . Value = showing ;
123
- Handler . SaveConfig ( ) ;
130
+ Handler . OnAnyConfigChanged ( ) ;
124
131
}
125
132
126
133
// Window Anchors helpers
0 commit comments