11using System ;
2- using System . IO ;
3- using System . Linq ;
42using Modding . Humankind . DevTools ;
53using Modding . Humankind . DevTools . DeveloperTools . UI ;
64using DevTools . Humankind . GUITools . UI ;
7- using HarmonyLib ;
8- using Amplitude . Mercury . Presentation ;
9- using BepInEx ;
10- using BepInEx . Configuration ;
115using DevTools . Humankind . GUITools . UI . PauseMenu ;
6+ using StyledGUI ;
127
138namespace DevTools . Humankind . GUITools
149{
@@ -29,11 +24,14 @@ public static class MainTools
2924 public static FameToolWindow FameWindow { get ; set ; }
3025 public static EndGameToolWindow EndGameWindow { get ; set ; }
3126 public static GameStatsWindow StatsWindow { get ; set ; }
27+ public static BackScreenWindow BackScreen { get ; set ; }
3228
3329 public static void Main ( )
3430 {
3531 if ( IsDebugModeEnabled ) Debug ( ) ;
3632
33+ UIController . OnceGUIHasLoaded ( ( ) => StyledGUIUtility . DefaultSkin = UIController . DefaultSkin ) ;
34+ PopupToolWindow . Open < BackScreenWindow > ( w => BackScreen = w ) ;
3735 PopupToolWindow . Open < MainToolbar > ( w => Toolbar = w ) ;
3836 PopupToolWindow . Open < InGameMenuWindow > ( w => InGameMenu = w ) ;
3937
@@ -45,24 +43,31 @@ public static void Main()
4543 // PopupToolWindow.Open<EndGameToolWindow>(w => EndGameWindow = w);
4644 // PopupToolWindow.Open<GameStatsWindow>(w => StatsWindow = w);
4745
48- // HumankindDevTools.RegisterAction(new KeyboardShortcut(UnityEngine.KeyCode.Home ), "ToggleBasicToolWindow", ToggleBasicToolWindow);
49- HumankindDevTools . RegisterAction ( new KeyboardShortcut ( UnityEngine . KeyCode . Home ) , "ToggleHideToolbarWindow" , ToggleHideToolbarWindow ) ;
50- HumankindDevTools . RegisterAction ( new KeyboardShortcut ( UnityEngine . KeyCode . Tab ) , "ToggleGameOverviewWindow" , ToggleGameOverviewWindow ) ;
51-
52- HumankindDevTools . RegisterAction (
46+ // HumankindDevTools.RegisterAction(new KeyboardShortcut(UnityEngine.KeyCode.UpArrow, UnityEngine.KeyCode.LeftControl ), "ToggleBasicToolWindow", ToggleBasicToolWindow);
47+ // HumankindDevTools.RegisterAction(new KeyboardShortcut(UnityEngine.KeyCode.Home), "ToggleHideToolbarWindow", ToggleHideToolbarWindow);
48+ // HumankindDevTools.RegisterAction(new KeyboardShortcut(UnityEngine.KeyCode.Tab), "ToggleGameOverviewWindow", ToggleGameOverviewWindow);
49+
50+ /* HumankindDevTools.RegisterAction(
5351 new KeyboardShortcut(UnityEngine.KeyCode.Insert),
5452 "ToggleHideAllGUITools",
55- ToggleHideAllUIWindows ) ;
56-
53+ ToggleHideAllUIWindows);*/
54+
5755 // Maps [ESC] key to: GodMode.Enabled = false
5856 // HumankindDevTools.RegisterAction(new KeyboardShortcut(UnityEngine.KeyCode.Escape), "CancelGodMode", CancelGodMode);
5957
60- // ToggleGameOverviewWindow();
58+ // ToggleGameOverviewWindow();
59+ // ToggleBasicToolWindow();
60+
61+ /*HumankindDevTools.RegisterAction(
62+ new KeyboardShortcut(UnityEngine.KeyCode.F4, UnityEngine.KeyCode.LeftShift),
63+ "RebuildConstructibles",
64+ ConstructibleStore.Rebuild);*/
6165 }
6266
6367 public static void ToggleHideToolbarWindow ( ) => GlobalSettings . HideToolbarWindow . Value = ! GlobalSettings . HideToolbarWindow . Value ;
6468
65- public static void ToggleHideAllUIWindows ( ) => FloatingToolWindow . HideAllGUITools = ! FloatingToolWindow . HideAllGUITools ;
69+ public static void ToggleHideAllUIWindows ( ) =>
70+ Loggr . Log ( "HIDDING ALL GUI TOOLS WINDOWS IS TEMPORARILY DISABLED" , ConsoleColor . Magenta ) ; //FloatingToolWindow.HideAllGUITools = !FloatingToolWindow.HideAllGUITools);
6671
6772 // public static void CancelGodMode() => AccessTools.PropertySetter(typeof(GodMode), "Enabled")?.Invoke(null, new object[] { false });
6873
@@ -103,20 +108,22 @@ public static void Unload(bool saveState = false) {
103108 FameWindow ? . Close ( ) ;
104109 EndGameWindow ? . Close ( ) ;
105110 StatsWindow ? . Close ( ) ;
111+ BackScreen ? . Close ( ) ;
112+ ScreenLocker . Unload ( ) ;
106113 }
107114
108115 private static void Debug ( )
109116 {
110- var scriptsPath = Path . Combine ( Paths . GameRootPath , "scripts" ) ;
117+ /* var scriptsPath = Path.Combine(Paths.GameRootPath, "scripts");
111118 var files = Directory.GetFiles(scriptsPath, "*.cs", SearchOption.AllDirectories)
112119 .Where(path => path.Substring(scriptsPath.Length, 5) != "\\obj\\");
113120
114- Loggr . Log ( string . Join ( "\n " , files ) , ConsoleColor . DarkYellow ) ;
121+ Loggr.Log(string.Join("\n", files), ConsoleColor.DarkYellow);*/
115122
116123 // When true, draws a colored border for all UIOverlays backing a FloatingToolWindow derived class
117124 UIOverlay . DEBUG_DRAW_OVERLAY = false ;
118125 // When not true, adds more verbosity to console output
119- Modding . Humankind . DevTools . DevTools . QuietMode = true ;
126+ Modding . Humankind . DevTools . DevTools . QuietMode = false ;
120127 }
121128 }
122129}
0 commit comments