From 83f37ee6c37d2d2d42b33614b04c306c8e7a917e Mon Sep 17 00:00:00 2001 From: pizzaboxer <41478239+pizzaboxer@users.noreply.github.com> Date: Tue, 17 Jan 2023 22:13:51 +0000 Subject: [PATCH] Rework Preferences menu and file modding Adds help windows to the Preferences menu, reworked directory structure and allowed files in the root mod directory to be applied to the version folder. --- Bloxstrap/Bootstrapper.cs | 23 ++------ Bloxstrap/Dialogs/Menu/ModHelp.xaml | 39 ++++++++++++++ Bloxstrap/Dialogs/Menu/ModHelp.xaml.cs | 33 ++++++++++++ Bloxstrap/Dialogs/{ => Menu}/Preferences.xaml | 25 +++++---- .../Dialogs/{ => Menu}/Preferences.xaml.cs | 44 +++++++++++---- Bloxstrap/Dialogs/Menu/ReShadeHelp.xaml | 54 +++++++++++++++++++ Bloxstrap/Dialogs/Menu/ReShadeHelp.xaml.cs | 33 ++++++++++++ .../{ => Menu}/Themes/ColourfulDarkTheme.xaml | 0 .../Themes/ColourfulDarkTheme.xaml.cs | 0 .../Themes/ColourfulLightTheme.xaml | 0 .../Themes/ColourfulLightTheme.xaml.cs | 0 .../Dialogs/{ => Menu}/Themes/DarkTheme.xaml | 0 .../{ => Menu}/Themes/DarkTheme.xaml.cs | 0 .../Dialogs/{ => Menu}/Themes/LightTheme.xaml | 0 .../{ => Menu}/Themes/LightTheme.xaml.cs | 0 Bloxstrap/Helpers/Integrations/ReShade.cs | 4 ++ Bloxstrap/Helpers/Updater.cs | 7 +-- Bloxstrap/Program.cs | 14 +++-- 18 files changed, 223 insertions(+), 53 deletions(-) create mode 100644 Bloxstrap/Dialogs/Menu/ModHelp.xaml create mode 100644 Bloxstrap/Dialogs/Menu/ModHelp.xaml.cs rename Bloxstrap/Dialogs/{ => Menu}/Preferences.xaml (88%) rename Bloxstrap/Dialogs/{ => Menu}/Preferences.xaml.cs (90%) create mode 100644 Bloxstrap/Dialogs/Menu/ReShadeHelp.xaml create mode 100644 Bloxstrap/Dialogs/Menu/ReShadeHelp.xaml.cs rename Bloxstrap/Dialogs/{ => Menu}/Themes/ColourfulDarkTheme.xaml (100%) rename Bloxstrap/Dialogs/{ => Menu}/Themes/ColourfulDarkTheme.xaml.cs (100%) rename Bloxstrap/Dialogs/{ => Menu}/Themes/ColourfulLightTheme.xaml (100%) rename Bloxstrap/Dialogs/{ => Menu}/Themes/ColourfulLightTheme.xaml.cs (100%) rename Bloxstrap/Dialogs/{ => Menu}/Themes/DarkTheme.xaml (100%) rename Bloxstrap/Dialogs/{ => Menu}/Themes/DarkTheme.xaml.cs (100%) rename Bloxstrap/Dialogs/{ => Menu}/Themes/LightTheme.xaml (100%) rename Bloxstrap/Dialogs/{ => Menu}/Themes/LightTheme.xaml.cs (100%) diff --git a/Bloxstrap/Bootstrapper.cs b/Bloxstrap/Bootstrapper.cs index f46d55f..ab1bbd0 100644 --- a/Bloxstrap/Bootstrapper.cs +++ b/Bloxstrap/Bootstrapper.cs @@ -61,19 +61,6 @@ namespace Bloxstrap " http://www.roblox.com\n" + "\n"; - private static readonly string ModReadme = - "This is where you can modify your Roblox files while preserving modifications\n" + - "whenever Roblox updates.\n" + - "\n" + - "For example, Modifications\\content\\sounds\\ouch.ogg will\n" + - "automatically overwrite Versions\\version-xx...\\content\\sounds\\ouch.ogg\n" + - "\n" + - "If you remove a file mod from here, Bloxstrap will restore the stock version\n" + - "of the file the next time it's launched.\n" + - "\n" + - "Any files added here to the root modification directory are ignored, so be sure\n" + - "that they're inside a folder."; - private string? LaunchCommandLine; private string VersionGuid = null!; @@ -544,10 +531,7 @@ namespace Bloxstrap List modFolderFiles = new(); if (!Directory.Exists(modFolder)) - { Directory.CreateDirectory(modFolder); - await File.WriteAllTextAsync(Path.Combine(modFolder, "README.txt"), ModReadme); - } await CheckModPreset(Program.Settings.UseOldDeathSound, @"content\sounds\ouch.ogg", "OldDeath.ogg"); await CheckModPreset(Program.Settings.UseOldMouseCursor, @"content\textures\Cursors\KeyboardMouse\ArrowCursor.png", "OldCursor.png"); @@ -561,9 +545,12 @@ namespace Bloxstrap // get relative directory path string relativeFile = file.Substring(modFolder.Length + 1); - // ignore files placed in the root directory as long as they're not ini or dll files - if (!relativeFile.Contains('\\') && !relativeFile.EndsWith(".ini") && !relativeFile.EndsWith(".dll")) + // v1.7.0 - README has been moved to the preferences menu now + if (relativeFile == "README.txt") + { + File.Delete(file); continue; + } modFolderFiles.Add(relativeFile); } diff --git a/Bloxstrap/Dialogs/Menu/ModHelp.xaml b/Bloxstrap/Dialogs/Menu/ModHelp.xaml new file mode 100644 index 0000000..4775db9 --- /dev/null +++ b/Bloxstrap/Dialogs/Menu/ModHelp.xaml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + +