Merge branch 'version-2.5.3' into feature/studio

This commit is contained in:
pizzaboxer 2023-10-10 22:28:24 +01:00 committed by GitHub
commit d7f257955b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 208 additions and 22 deletions

26
.github/ISSUE_TEMPLATE/bug_report.yaml vendored Normal file
View File

@ -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

View File

@ -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

View File

@ -10,7 +10,7 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

View File

@ -10,6 +10,8 @@ namespace Bloxstrap
public class Bootstrapper
{
#region Properties
private const int ProgressBarMaximum = 10000;
private const string AppSettings =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" +
"<Settings>\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;
}
Dialog.ProgressMaximum = ProgressBarMaximum;
// compute total bytes to download
_progressIncrement = (double)100 / _versionPackageManifest.Sum(package => package.PackedSize);
_progressIncrement = (double)ProgressBarMaximum / _versionPackageManifest.Sum(package => package.PackedSize);
}
foreach (Package package in _versionPackageManifest)
{

View File

@ -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<string, string> PresetFlags = new Dictionary<string, string>
{
@ -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<string, string> MaterialVersions => new Dictionary<string, string>
{
{ "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<string, Dictionary<string, string?>> IGMenuVersions => new Dictionary<string, Dictionary<string, string?>>

View File

@ -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;

View File

@ -38,7 +38,7 @@
<ScaleTransform ScaleY="0.9"/>
</TextBlock.LayoutTransform>
</TextBlock>
<ProgressBar Grid.Row="1" Width="480" Height="12" Foreground="{Binding Foreground}" Background="{Binding ProgressBarBackground}" BorderThickness="0" IsIndeterminate="{Binding ProgressIndeterminate}" Value="{Binding ProgressValue}"></ProgressBar>
<ProgressBar Grid.Row="1" Width="480" Height="12" Foreground="{Binding Foreground}" Background="{Binding ProgressBarBackground}" BorderThickness="0" IsIndeterminate="{Binding ProgressIndeterminate}" Maximum="{Binding ProgressMaximum, Mode=OneWay}" Value="{Binding ProgressValue}"></ProgressBar>
</Grid>
</Grid>
</Border>

View File

@ -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;

View File

@ -36,7 +36,7 @@
</Border>
<StackPanel Grid.Column="1">
<TextBlock Margin="16,8,0,0" FontSize="20" Text="{Binding Message, Mode=OneWay}" Foreground="{DynamicResource TextFillColorPrimaryBrush}" />
<ProgressBar Margin="16,16,0,16" IsIndeterminate="{Binding ProgressIndeterminate, Mode=OneWay}" Value="{Binding ProgressValue, Mode=OneWay}" />
<ProgressBar Margin="16,16,0,16" IsIndeterminate="{Binding ProgressIndeterminate, Mode=OneWay}" Maximum="{Binding ProgressMaximum, Mode=OneWay}" Value="{Binding ProgressValue, Mode=OneWay}" />
</StackPanel>
</Grid>

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -60,6 +60,18 @@
</Grid>
</MenuItem.Header>
</MenuItem>
<MenuItem x:Name="CloseRobloxMenuItem" Visibility="Collapsed" Click="CloseRobloxMenuItem_Click">
<MenuItem.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="24" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ui:SymbolIcon Grid.Column="0" Symbol="WindowHeaderHorizontalOff20"/>
<TextBlock Grid.Column="1" VerticalAlignment="Center" Margin="4,0,0,0" Text="Close Roblox" />
</Grid>
</MenuItem.Header>
</MenuItem>
<MenuItem x:Name="LogTracerMenuItem" Header="Open log tracer" Visibility="Collapsed" Click="LogTracerMenuItem_Click" />
</ContextMenu>
</ui:UiWindow.ContextMenu>

View File

@ -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();
}
}
}

View File

@ -150,17 +150,17 @@
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" FontSize="14" Text="Use old material textures" />
<TextBlock Grid.Column="0" FontSize="14" Text="Preferred materials" />
<TextBlock Grid.Column="1" Margin="4,0,0,0">
<Hyperlink TextDecorations="None" ToolTip="More information on this preset" Command="models:GlobalViewModel.OpenWebpageCommand" CommandParameter="https://github.com/pizzaboxer/bloxstrap/wiki/A-guide-to-FastFlags#old-material-textures">
<ui:SymbolIcon Symbol="QuestionCircle48" Margin="0,1,0,0" />
</Hyperlink>
</TextBlock>
</Grid>
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Toggle whether to use the old material textures used prior to 2022." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Choose which material version should be forced in all games." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
</StackPanel>
</ui:CardControl.Header>
<ui:ToggleSwitch IsChecked="{Binding Pre2022TexturesEnabled, Mode=TwoWay}" />
<ComboBox Margin="5,0,0,0" Padding="10,5,10,5" Width="200" ItemsSource="{Binding MaterialVersions.Keys, Mode=OneTime}" Text="{Binding SelectedMaterialVersion, Mode=TwoWay}" />
</ui:CardControl>
<ui:CardControl Margin="0,8,0,0">
<ui:CardControl.Header>

View File

@ -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();

View File

@ -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();
}

View File

@ -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;

View File

@ -82,10 +82,21 @@ namespace Bloxstrap.UI.ViewModels.Menu
set => App.FastFlags.SetPreset("UI.Menu.GraphicsSlider", value ? "True" : null);
}
public bool Pre2022TexturesEnabled
public IReadOnlyDictionary<string, string> 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<string, Dictionary<string, string?>> IGMenuVersions => FastFlagManager.IGMenuVersions;

View File

@ -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

2
wpfui

@ -1 +1 @@
Subproject commit 55d5ca08f9a1d7623f9a7e386e1f4ac9f2d024a7
Subproject commit 2a50f387e6c3b0a9160f3ce42bc95fbb7185e87d