diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 0000000..5e80359 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,26 @@ +name: Bug Report +title: "[BUG] " +description: Report a problem you're having +body: + - type: markdown + attributes: + value: | + ### **Preliminary instructions** + - Before opening an issue, please [check the Wiki first](https://github.com/pizzaboxer/bloxstrap/wiki/) to see if your problem has been addressed there. + - If you are getting a Bloxstrap Exception error, please attach a copy of the provided log file. There is a button on the dialog that locates it for you. + - If your problem is with Roblox itself, [check to see if it happens without Bloxstrap](https://github.com/pizzaboxer/bloxstrap/wiki/Roblox-crashes-or-does-not-launch). Please only open an issue if your problem only happens with Bloxstrap, as anything else is out of my control. + - If more clarification on the issue is needed, and you don't respond after a month, then your issue will be closed as stale. + - type: checkboxes + id: terms + attributes: + label: Acknowledgement of preliminary instructions + options: + - label: I have read the preliminary instructions, and I am certain that my problem has not already been addressed. + required: true + - type: textarea + id: what-happened + attributes: + label: What problem did you encounter? + description: Provide a comprehensive description of the problem you're facing. Don't forget to attach any additional resources you may have, such as log files and screenshots. + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml new file mode 100644 index 0000000..b9c53b9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -0,0 +1,25 @@ +name: Feature Request +title: "[REQ] " +description: Suggest a feature that should be added +body: + - type: markdown + attributes: + value: | + ### **Preliminary instructions** + - Please first check to see if your idea has already been suggested. You can check by [searching all previous issues](https://github.com/pizzaboxer/bloxstrap/issues?q=is%3Aissue). + - If your feature suggestion is to do with Roblox itself, please consider that what's possible is heavily constrained by what [FastFlags](https://github.com/pizzaboxer/bloxstrap/wiki/A-guide-to-FastFlags) are available. + - Don't ask for support on Linux or Mac. That's not happening anytime soon, sorry. + - type: checkboxes + id: terms + attributes: + label: Acknowledgement of preliminary instructions + options: + - label: I have read and acknowledged the preliminary instructions. + required: true + - type: textarea + id: what-happened + attributes: + label: What idea do you have? + description: Provide a comprehensive description of what you think can be improved! + validations: + required: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb38b99..a504126 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true diff --git a/Bloxstrap/Bootstrapper.cs b/Bloxstrap/Bootstrapper.cs index a4dd414..dfeb1b8 100644 --- a/Bloxstrap/Bootstrapper.cs +++ b/Bloxstrap/Bootstrapper.cs @@ -10,6 +10,8 @@ namespace Bloxstrap public class Bootstrapper { #region Properties + private const int ProgressBarMaximum = 10000; + private const string AppSettings = "\r\n" + "\r\n" + @@ -107,15 +109,16 @@ namespace Bloxstrap private void UpdateProgressBar() { - int newProgress = (int)Math.Floor(_progressIncrement * _totalDownloadedBytes); + if (Dialog is null) + return; + + int progressValue = (int)Math.Floor(_progressIncrement * _totalDownloadedBytes); // bugcheck: if we're restoring a file from a package, it'll incorrectly increment the progress beyond 100 // too lazy to fix properly so lol - if (newProgress > 100) - return; + progressValue = Math.Clamp(progressValue, 0, ProgressBarMaximum); - if (Dialog is not null) - Dialog.ProgressValue = newProgress; + Dialog.ProgressValue = progressValue; } public async Task Run() @@ -365,6 +368,9 @@ namespace Bloxstrap } if (App.Settings.Prop.EnableActivityTracking && !_studioLaunch) + App.NotifyIcon?.SetProcessId(gameClientPid); + + if (App.Settings.Prop.EnableActivityTracking) { activityWatcher = new(); shouldWait = true; @@ -872,10 +878,12 @@ namespace Bloxstrap { Dialog.CancelEnabled = true; Dialog.ProgressStyle = ProgressBarStyle.Continuous; - } - // compute total bytes to download - _progressIncrement = (double)100 / _versionPackageManifest.Sum(package => package.PackedSize); + Dialog.ProgressMaximum = ProgressBarMaximum; + + // compute total bytes to download + _progressIncrement = (double)ProgressBarMaximum / _versionPackageManifest.Sum(package => package.PackedSize); + } foreach (Package package in _versionPackageManifest) { diff --git a/Bloxstrap/FastFlagManager.cs b/Bloxstrap/FastFlagManager.cs index b3b94ea..53c5874 100644 --- a/Bloxstrap/FastFlagManager.cs +++ b/Bloxstrap/FastFlagManager.cs @@ -11,6 +11,7 @@ namespace Bloxstrap // this is the value of the 'FStringPartTexturePackTablePre2022' flag public const string OldTexturesFlagValue = "{\"foil\":{\"ids\":[\"rbxassetid://7546645012\",\"rbxassetid://7546645118\"],\"color\":[255,255,255,255]},\"brick\":{\"ids\":[\"rbxassetid://7546650097\",\"rbxassetid://7546645118\"],\"color\":[204,201,200,232]},\"cobblestone\":{\"ids\":[\"rbxassetid://7546652947\",\"rbxassetid://7546645118\"],\"color\":[212,200,187,250]},\"concrete\":{\"ids\":[\"rbxassetid://7546653951\",\"rbxassetid://7546654144\"],\"color\":[208,208,208,255]},\"diamondplate\":{\"ids\":[\"rbxassetid://7547162198\",\"rbxassetid://7546645118\"],\"color\":[170,170,170,255]},\"fabric\":{\"ids\":[\"rbxassetid://7547101130\",\"rbxassetid://7546645118\"],\"color\":[105,104,102,244]},\"glass\":{\"ids\":[\"rbxassetid://7547304948\",\"rbxassetid://7546645118\"],\"color\":[254,254,254,7]},\"granite\":{\"ids\":[\"rbxassetid://7547164710\",\"rbxassetid://7546645118\"],\"color\":[113,113,113,255]},\"grass\":{\"ids\":[\"rbxassetid://7547169285\",\"rbxassetid://7546645118\"],\"color\":[165,165,159,255]},\"ice\":{\"ids\":[\"rbxassetid://7547171356\",\"rbxassetid://7546645118\"],\"color\":[255,255,255,255]},\"marble\":{\"ids\":[\"rbxassetid://7547177270\",\"rbxassetid://7546645118\"],\"color\":[199,199,199,255]},\"metal\":{\"ids\":[\"rbxassetid://7547288171\",\"rbxassetid://7546645118\"],\"color\":[199,199,199,255]},\"pebble\":{\"ids\":[\"rbxassetid://7547291361\",\"rbxassetid://7546645118\"],\"color\":[208,208,208,255]},\"corrodedmetal\":{\"ids\":[\"rbxassetid://7547184629\",\"rbxassetid://7546645118\"],\"color\":[159,119,95,200]},\"sand\":{\"ids\":[\"rbxassetid://7547295153\",\"rbxassetid://7546645118\"],\"color\":[220,220,220,255]},\"slate\":{\"ids\":[\"rbxassetid://7547298114\",\"rbxassetid://7547298323\"],\"color\":[193,193,193,255]},\"wood\":{\"ids\":[\"rbxassetid://7547303225\",\"rbxassetid://7547298786\"],\"color\":[227,227,227,255]},\"woodplanks\":{\"ids\":[\"rbxassetid://7547332968\",\"rbxassetid://7546645118\"],\"color\":[212,209,203,255]},\"asphalt\":{\"ids\":[\"rbxassetid://9873267379\",\"rbxassetid://9438410548\"],\"color\":[123,123,123,234]},\"basalt\":{\"ids\":[\"rbxassetid://9873270487\",\"rbxassetid://9438413638\"],\"color\":[154,154,153,238]},\"crackedlava\":{\"ids\":[\"rbxassetid://9438582231\",\"rbxassetid://9438453972\"],\"color\":[74,78,80,156]},\"glacier\":{\"ids\":[\"rbxassetid://9438851661\",\"rbxassetid://9438453972\"],\"color\":[226,229,229,243]},\"ground\":{\"ids\":[\"rbxassetid://9439044431\",\"rbxassetid://9438453972\"],\"color\":[114,114,112,240]},\"leafygrass\":{\"ids\":[\"rbxassetid://9873288083\",\"rbxassetid://9438453972\"],\"color\":[121,117,113,234]},\"limestone\":{\"ids\":[\"rbxassetid://9873289812\",\"rbxassetid://9438453972\"],\"color\":[235,234,230,250]},\"mud\":{\"ids\":[\"rbxassetid://9873319819\",\"rbxassetid://9438453972\"],\"color\":[130,130,130,252]},\"pavement\":{\"ids\":[\"rbxassetid://9873322398\",\"rbxassetid://9438453972\"],\"color\":[142,142,144,236]},\"rock\":{\"ids\":[\"rbxassetid://9873515198\",\"rbxassetid://9438453972\"],\"color\":[154,154,154,248]},\"salt\":{\"ids\":[\"rbxassetid://9439566986\",\"rbxassetid://9438453972\"],\"color\":[220,220,221,255]},\"sandstone\":{\"ids\":[\"rbxassetid://9873521380\",\"rbxassetid://9438453972\"],\"color\":[174,171,169,246]},\"snow\":{\"ids\":[\"rbxassetid://9439632387\",\"rbxassetid://9438453972\"],\"color\":[218,218,218,255]}}"; + public const string NewTexturesFlagValue = "{\"foil\":{\"ids\":[\"rbxassetid://9873266399\",\"rbxassetid://9438410239\"],\"color\":[238,238,238,255]},\"asphalt\":{\"ids\":[\"rbxassetid://9930003180\",\"rbxassetid://9438410548\"],\"color\":[227,227,228,234]},\"basalt\":{\"ids\":[\"rbxassetid://9920482224\",\"rbxassetid://9438413638\"],\"color\":[160,160,158,238]},\"brick\":{\"ids\":[\"rbxassetid://9920482992\",\"rbxassetid://9438453972\"],\"color\":[229,214,205,227]},\"cobblestone\":{\"ids\":[\"rbxassetid://9919719550\",\"rbxassetid://9438453972\"],\"color\":[218,219,219,243]},\"concrete\":{\"ids\":[\"rbxassetid://9920484334\",\"rbxassetid://9438453972\"],\"color\":[225,225,224,255]},\"crackedlava\":{\"ids\":[\"rbxassetid://9920485426\",\"rbxassetid://9438453972\"],\"color\":[76,79,81,156]},\"diamondplate\":{\"ids\":[\"rbxassetid://10237721036\",\"rbxassetid://9438453972\"],\"color\":[210,210,210,255]},\"fabric\":{\"ids\":[\"rbxassetid://9920517963\",\"rbxassetid://9438453972\"],\"color\":[221,221,221,255]},\"glacier\":{\"ids\":[\"rbxassetid://9920518995\",\"rbxassetid://9438453972\"],\"color\":[225,229,229,243]},\"glass\":{\"ids\":[\"rbxassetid://9873284556\",\"rbxassetid://9438453972\"],\"color\":[254,254,254,7]},\"granite\":{\"ids\":[\"rbxassetid://9920550720\",\"rbxassetid://9438453972\"],\"color\":[210,206,200,255]},\"grass\":{\"ids\":[\"rbxassetid://9920552044\",\"rbxassetid://9438453972\"],\"color\":[196,196,189,241]},\"ground\":{\"ids\":[\"rbxassetid://9920554695\",\"rbxassetid://9438453972\"],\"color\":[165,165,160,240]},\"ice\":{\"ids\":[\"rbxassetid://9920556429\",\"rbxassetid://9438453972\"],\"color\":[235,239,241,248]},\"leafygrass\":{\"ids\":[\"rbxassetid://9920558145\",\"rbxassetid://9438453972\"],\"color\":[182,178,175,234]},\"limestone\":{\"ids\":[\"rbxassetid://9920561624\",\"rbxassetid://9438453972\"],\"color\":[250,248,243,250]},\"marble\":{\"ids\":[\"rbxassetid://9873292869\",\"rbxassetid://9438453972\"],\"color\":[181,183,193,249]},\"metal\":{\"ids\":[\"rbxassetid://9920574966\",\"rbxassetid://9438453972\"],\"color\":[226,226,226,255]},\"mud\":{\"ids\":[\"rbxassetid://9920578676\",\"rbxassetid://9438453972\"],\"color\":[193,192,193,252]},\"pavement\":{\"ids\":[\"rbxassetid://9920580094\",\"rbxassetid://9438453972\"],\"color\":[218,218,219,236]},\"pebble\":{\"ids\":[\"rbxassetid://9920581197\",\"rbxassetid://9438453972\"],\"color\":[204,203,201,234]},\"plastic\":{\"ids\":[\"\",\"rbxassetid://9475422736\"],\"color\":[255,255,255,255]},\"rock\":{\"ids\":[\"rbxassetid://10129366149\",\"rbxassetid://9438453972\"],\"color\":[211,211,210,248]},\"corrodedmetal\":{\"ids\":[\"rbxassetid://9920589512\",\"rbxassetid://9439557520\"],\"color\":[206,177,163,180]},\"salt\":{\"ids\":[\"rbxassetid://9920590478\",\"rbxassetid://9438453972\"],\"color\":[249,249,249,255]},\"sand\":{\"ids\":[\"rbxassetid://9920591862\",\"rbxassetid://9438453972\"],\"color\":[218,216,210,240]},\"sandstone\":{\"ids\":[\"rbxassetid://9920596353\",\"rbxassetid://9438453972\"],\"color\":[241,234,230,246]},\"slate\":{\"ids\":[\"rbxassetid://9920600052\",\"rbxassetid://9439613006\"],\"color\":[235,234,235,254]},\"snow\":{\"ids\":[\"rbxassetid://9920620451\",\"rbxassetid://9438453972\"],\"color\":[239,240,240,255]},\"wood\":{\"ids\":[\"rbxassetid://9920625499\",\"rbxassetid://9439649548\"],\"color\":[217,209,208,255]},\"woodplanks\":{\"ids\":[\"rbxassetid://9920626896\",\"rbxassetid://9438453972\"],\"color\":[207,208,206,254]}}"; public static IReadOnlyDictionary PresetFlags = new Dictionary { @@ -25,9 +26,11 @@ namespace Bloxstrap { "Rendering.Framerate", "DFIntTaskSchedulerTargetFps" }, { "Rendering.ManualFullscreen", "FFlagHandleAltEnterFullscreenManually" }, - { "Rendering.TexturePack", "FStringPartTexturePackTable2022" }, { "Rendering.DisableScaling", "DFFlagDisableDPIScale" }, + { "Rendering.Materials.NewTexturePack", "FStringPartTexturePackTable2022" }, + { "Rendering.Materials.OldTexturePack", "FStringPartTexturePackTablePre2022" }, + { "Rendering.Mode.D3D11", "FFlagDebugGraphicsPreferD3D11" }, { "Rendering.Mode.D3D10", "FFlagDebugGraphicsPreferD3D11FL10" }, { "Rendering.Mode.Vulkan", "FFlagDebugGraphicsPreferVulkan" }, @@ -79,6 +82,13 @@ namespace Bloxstrap { "8x MSAA", "8" } }; + public static IReadOnlyDictionary MaterialVersions => new Dictionary + { + { "Chosen by game", "None" }, + { "Old (Pre-2022)", "NewTexturePack" }, + { "New (2022)", "OldTexturePack" } + }; + // this is one hell of a dictionary definition lmao // since these all set the same flags, wouldn't making this use bitwise operators be better? public static IReadOnlyDictionary> IGMenuVersions => new Dictionary> diff --git a/Bloxstrap/UI/Elements/Bootstrapper/Base/WinFormsDialogBase.cs b/Bloxstrap/UI/Elements/Bootstrapper/Base/WinFormsDialogBase.cs index 69d4b36..d59bdc5 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/Base/WinFormsDialogBase.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/Base/WinFormsDialogBase.cs @@ -14,6 +14,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper.Base protected virtual string _message { get; set; } = "Please wait..."; protected virtual ProgressBarStyle _progressStyle { get; set; } protected virtual int _progressValue { get; set; } + protected virtual int _progressMaximum { get; set; } protected virtual bool _cancelEnabled { get; set; } public string Message @@ -40,6 +41,18 @@ namespace Bloxstrap.UI.Elements.Bootstrapper.Base } } + public int ProgressMaximum + { + get => _progressMaximum; + set + { + if (InvokeRequired) + Invoke(() => _progressMaximum = value); + else + _progressMaximum = value; + } + } + public int ProgressValue { get => _progressValue; diff --git a/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml b/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml index 183be50..1a0b6c8 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml +++ b/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml @@ -38,7 +38,7 @@ - + diff --git a/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml.cs b/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml.cs index c94bf59..4d709ec 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml.cs @@ -41,6 +41,16 @@ namespace Bloxstrap.UI.Elements.Bootstrapper } } + public int ProgressMaximum + { + get => _viewModel.ProgressMaximum; + set + { + _viewModel.ProgressMaximum = value; + _viewModel.OnPropertyChanged(nameof(_viewModel.ProgressMaximum)); + } + } + public int ProgressValue { get => _viewModel.ProgressValue; diff --git a/Bloxstrap/UI/Elements/Bootstrapper/FluentDialog.xaml b/Bloxstrap/UI/Elements/Bootstrapper/FluentDialog.xaml index 40cc7f9..ce265a6 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/FluentDialog.xaml +++ b/Bloxstrap/UI/Elements/Bootstrapper/FluentDialog.xaml @@ -36,7 +36,7 @@ - + diff --git a/Bloxstrap/UI/Elements/Bootstrapper/FluentDialog.xaml.cs b/Bloxstrap/UI/Elements/Bootstrapper/FluentDialog.xaml.cs index 7ab6cdc..780e75d 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/FluentDialog.xaml.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/FluentDialog.xaml.cs @@ -42,6 +42,16 @@ namespace Bloxstrap.UI.Elements.Bootstrapper } } + public int ProgressMaximum + { + get => _viewModel.ProgressMaximum; + set + { + _viewModel.ProgressMaximum = value; + _viewModel.OnPropertyChanged(nameof(_viewModel.ProgressMaximum)); + } + } + public int ProgressValue { get => _viewModel.ProgressValue; diff --git a/Bloxstrap/UI/Elements/Bootstrapper/LegacyDialog2008.cs b/Bloxstrap/UI/Elements/Bootstrapper/LegacyDialog2008.cs index ce2a1e8..c1dd219 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/LegacyDialog2008.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/LegacyDialog2008.cs @@ -21,6 +21,12 @@ namespace Bloxstrap.UI.Elements.Bootstrapper set => ProgressBar.Style = value; } + protected override int _progressMaximum + { + get => ProgressBar.Maximum; + set => ProgressBar.Maximum = value; + } + protected override int _progressValue { get => ProgressBar.Value; diff --git a/Bloxstrap/UI/Elements/Bootstrapper/LegacyDialog2011.cs b/Bloxstrap/UI/Elements/Bootstrapper/LegacyDialog2011.cs index 5f92d4e..7248b1c 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/LegacyDialog2011.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/LegacyDialog2011.cs @@ -20,6 +20,12 @@ namespace Bloxstrap.UI.Elements.Bootstrapper set => ProgressBar.Style = value; } + protected override int _progressMaximum + { + get => ProgressBar.Maximum; + set => ProgressBar.Maximum = value; + } + protected override int _progressValue { get => ProgressBar.Value; diff --git a/Bloxstrap/UI/Elements/Bootstrapper/ProgressDialog.cs b/Bloxstrap/UI/Elements/Bootstrapper/ProgressDialog.cs index 4f9bb01..b00e8c6 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/ProgressDialog.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/ProgressDialog.cs @@ -21,6 +21,12 @@ namespace Bloxstrap.UI.Elements.Bootstrapper set => ProgressBar.Style = value; } + protected override int _progressMaximum + { + get => ProgressBar.Maximum; + set => ProgressBar.Maximum = value; + } + protected override int _progressValue { get => ProgressBar.Value; diff --git a/Bloxstrap/UI/Elements/Bootstrapper/VistaDialog.cs b/Bloxstrap/UI/Elements/Bootstrapper/VistaDialog.cs index 8a47f9c..c228bf8 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/VistaDialog.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/VistaDialog.cs @@ -37,6 +37,18 @@ namespace Bloxstrap.UI.Elements.Bootstrapper } } + protected sealed override int _progressMaximum + { + get => _dialogPage.ProgressBar?.Maximum ?? 0; + set + { + if (_dialogPage.ProgressBar is null) + return; + + _dialogPage.ProgressBar.Maximum = value; + } + } + protected sealed override int _progressValue { get => _dialogPage.ProgressBar?.Value ?? 0; diff --git a/Bloxstrap/UI/Elements/ContextMenu/MenuContainer.xaml b/Bloxstrap/UI/Elements/ContextMenu/MenuContainer.xaml index 58d48b3..95bb446 100644 --- a/Bloxstrap/UI/Elements/ContextMenu/MenuContainer.xaml +++ b/Bloxstrap/UI/Elements/ContextMenu/MenuContainer.xaml @@ -60,6 +60,18 @@ + + + + + + + + + + + + diff --git a/Bloxstrap/UI/Elements/ContextMenu/MenuContainer.xaml.cs b/Bloxstrap/UI/Elements/ContextMenu/MenuContainer.xaml.cs index f2b8df0..4c4d192 100644 --- a/Bloxstrap/UI/Elements/ContextMenu/MenuContainer.xaml.cs +++ b/Bloxstrap/UI/Elements/ContextMenu/MenuContainer.xaml.cs @@ -26,14 +26,16 @@ namespace Bloxstrap.UI.Elements.ContextMenu private LogTracer? _logTracerWindow; private ServerInformation? _serverInformationWindow; + private int? _processId; - public MenuContainer(ActivityWatcher? activityWatcher, DiscordRichPresence? richPresenceHandler) + public MenuContainer(ActivityWatcher? activityWatcher, DiscordRichPresence? richPresenceHandler, int? processId) { InitializeComponent(); ApplyTheme(); _activityWatcher = activityWatcher; _richPresenceHandler = richPresenceHandler; + _processId = processId; if (_activityWatcher is not null) { @@ -47,6 +49,9 @@ namespace Bloxstrap.UI.Elements.ContextMenu if (_richPresenceHandler is not null) RichPresenceMenuItem.Visibility = Visibility.Visible; + if (_processId is not null) + CloseRobloxMenuItem.Visibility = Visibility.Visible; + VersionTextBlock.Text = $"{App.ProjectName} v{App.Version}"; } @@ -118,5 +123,21 @@ namespace Bloxstrap.UI.Elements.ContextMenu _logTracerWindow.Activate(); } + + private void CloseRobloxMenuItem_Click(object sender, RoutedEventArgs e) + { + MessageBoxResult result = Controls.ShowMessageBox( + "Are you sure you want to close Roblox? This will forcefully end the process.", + MessageBoxImage.Warning, + MessageBoxButton.YesNo + ); + + if (result != MessageBoxResult.Yes) + return; + + using Process process = Process.GetProcessById((int)_processId!); + process.CloseMainWindow(); + process.Close(); + } } } diff --git a/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml b/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml index 666e665..66bb6c4 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml +++ b/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml @@ -150,17 +150,17 @@ - + - + - + diff --git a/Bloxstrap/UI/IBootstrapperDialog.cs b/Bloxstrap/UI/IBootstrapperDialog.cs index 4b44900..e15f7fb 100644 --- a/Bloxstrap/UI/IBootstrapperDialog.cs +++ b/Bloxstrap/UI/IBootstrapperDialog.cs @@ -9,6 +9,7 @@ namespace Bloxstrap.UI string Message { get; set; } ProgressBarStyle ProgressStyle { get; set; } int ProgressValue { get; set; } + int ProgressMaximum { get; set; } bool CancelEnabled { get; set; } void ShowBootstrapper(); diff --git a/Bloxstrap/UI/NotifyIconWrapper.cs b/Bloxstrap/UI/NotifyIconWrapper.cs index 6eb8e06..8ed8fea 100644 --- a/Bloxstrap/UI/NotifyIconWrapper.cs +++ b/Bloxstrap/UI/NotifyIconWrapper.cs @@ -16,6 +16,7 @@ namespace Bloxstrap.UI private ActivityWatcher? _activityWatcher; private DiscordRichPresence? _richPresenceHandler; + private int? _processId; EventHandler? _alertClickHandler; @@ -52,6 +53,14 @@ namespace Bloxstrap.UI if (App.Settings.Prop.ShowServerDetails) _activityWatcher.OnGameJoin += (_, _) => Task.Run(OnGameJoin); } + + public void SetProcessId(int processId) + { + if (_processId is not null) + return; + + _processId = processId; + } #endregion #region Context menu @@ -62,7 +71,7 @@ namespace Bloxstrap.UI App.Logger.WriteLine("NotifyIconWrapper::InitializeContextMenu", "Initializing context menu"); - _menuContainer = new(_activityWatcher, _richPresenceHandler); + _menuContainer = new(_activityWatcher, _richPresenceHandler, _processId); _menuContainer.ShowDialog(); } diff --git a/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs b/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs index 593921d..2a5c523 100644 --- a/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs @@ -16,6 +16,7 @@ namespace Bloxstrap.UI.ViewModels.Bootstrapper public ImageSource Icon { get; set; } = App.Settings.Prop.BootstrapperIcon.GetIcon().GetImageSource(); public string Message { get; set; } = "Please wait..."; public bool ProgressIndeterminate { get; set; } = true; + public int ProgressMaximum { get; set; } = 0; public int ProgressValue { get; set; } = 0; public bool CancelEnabled { get; set; } = false; diff --git a/Bloxstrap/UI/ViewModels/Menu/FastFlagsViewModel.cs b/Bloxstrap/UI/ViewModels/Menu/FastFlagsViewModel.cs index 8dee2e5..8114c83 100644 --- a/Bloxstrap/UI/ViewModels/Menu/FastFlagsViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Menu/FastFlagsViewModel.cs @@ -82,10 +82,21 @@ namespace Bloxstrap.UI.ViewModels.Menu set => App.FastFlags.SetPreset("UI.Menu.GraphicsSlider", value ? "True" : null); } - public bool Pre2022TexturesEnabled + public IReadOnlyDictionary MaterialVersions => FastFlagManager.MaterialVersions; + + public string SelectedMaterialVersion { - get => App.FastFlags.GetPreset("Rendering.TexturePack") == FastFlagManager.OldTexturesFlagValue; - set => App.FastFlags.SetPreset("Rendering.TexturePack", value ? FastFlagManager.OldTexturesFlagValue : null); + get + { + string oldMaterials = App.FastFlags.GetPresetEnum(MaterialVersions, "Rendering.Materials", FastFlagManager.OldTexturesFlagValue); + + if (oldMaterials != "Chosen by game") + return oldMaterials; + + return App.FastFlags.GetPresetEnum(MaterialVersions, "Rendering.Materials", FastFlagManager.NewTexturesFlagValue); + } + + set => App.FastFlags.SetPresetEnum("Rendering.Materials", MaterialVersions[value], MaterialVersions[value] == "NewTexturePack" ? FastFlagManager.OldTexturesFlagValue : FastFlagManager.NewTexturesFlagValue); } public IReadOnlyDictionary> IGMenuVersions => FastFlagManager.IGMenuVersions; diff --git a/README.md b/README.md index 68ff4db..65642a9 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,6 @@ Here's some of the features that Bloxstrap provides over the stock Roblox bootst * Support for easy and simple FastFlag editing, no need to mess around with a JSON file. * Painless and seamless support for Discord Rich Presence - no auth cookie needed! * A customizable launcher look -* Lets you opt into non-production Roblox release channels * Lets you see what region your current server is located in * Lets you have multiple Roblox game instances open simultaneously diff --git a/wpfui b/wpfui index 55d5ca0..2a50f38 160000 --- a/wpfui +++ b/wpfui @@ -1 +1 @@ -Subproject commit 55d5ca08f9a1d7623f9a7e386e1f4ac9f2d024a7 +Subproject commit 2a50f387e6c3b0a9160f3ce42bc95fbb7185e87d