Re-add option for disabling desktop app

Using the fix that @1011025m provided in the discussion for issue #40
This commit is contained in:
pizzaboxer 2022-12-26 23:42:19 +00:00
parent 5b94b2741a
commit 60b0f66085
6 changed files with 31 additions and 10 deletions

View File

@ -56,15 +56,13 @@ namespace Bloxstrap
"whenever Roblox updates.\n" + "whenever Roblox updates.\n" +
"\n" + "\n" +
"For example, Modifications\\content\\sounds\\ouch.ogg will\n" + "For example, Modifications\\content\\sounds\\ouch.ogg will\n" +
"overwrite Versions\\version-xxxxxxxxxxxxxxxx\\content\\sounds\\ouch.ogg\n" + "automatically overwrite Versions\\version-xx...\\content\\sounds\\ouch.ogg\n" +
"\n" + "\n" +
"If you remove a file mod from here, Bloxstrap will restore the stock version\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" + "of the file the next time it's launched.\n" +
"\n" + "\n" +
"Any files added here to the root modification directory are ignored.\n" + "Any files added here to the root modification directory are ignored, so be sure\n" +
"\n" + "that they're inside a folder.";
"By default, two mod presets are provided for restoring the old death\n" +
"sound and the old mouse cursor.\n";
private static readonly HttpClient Client = new(); private static readonly HttpClient Client = new();
@ -203,8 +201,8 @@ namespace Bloxstrap
shouldWait = true; shouldWait = true;
} }
// event fired, wait for 6 seconds then close // event fired, wait for 3 seconds then close
await Task.Delay(6000); await Task.Delay(3000);
// now we move onto handling rich presence // now we move onto handling rich presence
// this is going to be an issue for desktop app launches as this gets the place id from the command line, // this is going to be an issue for desktop app launches as this gets the place id from the command line,
@ -473,6 +471,7 @@ namespace Bloxstrap
CheckModPreset(Program.Settings.UseOldDeathSound, @"content\sounds\ouch.ogg", Program.Base64OldDeathSound); CheckModPreset(Program.Settings.UseOldDeathSound, @"content\sounds\ouch.ogg", Program.Base64OldDeathSound);
CheckModPreset(Program.Settings.UseOldMouseCursor, @"content\textures\Cursors\KeyboardMouse\ArrowCursor.png", Program.Base64OldArrowCursor); CheckModPreset(Program.Settings.UseOldMouseCursor, @"content\textures\Cursors\KeyboardMouse\ArrowCursor.png", Program.Base64OldArrowCursor);
CheckModPreset(Program.Settings.UseOldMouseCursor, @"content\textures\Cursors\KeyboardMouse\ArrowFarCursor.png", Program.Base64OldArrowFarCursor); CheckModPreset(Program.Settings.UseOldMouseCursor, @"content\textures\Cursors\KeyboardMouse\ArrowFarCursor.png", Program.Base64OldArrowFarCursor);
CheckModPreset(Program.Settings.UseDisableAppPatch, @"ExtraContent\places\Mobile.rbxl", "");
foreach (string file in Directory.GetFiles(modFolder, "*.*", SearchOption.AllDirectories)) foreach (string file in Directory.GetFiles(modFolder, "*.*", SearchOption.AllDirectories))
{ {

View File

@ -76,6 +76,7 @@
this.buttonCancel.Location = new System.Drawing.Point(194, 264); this.buttonCancel.Location = new System.Drawing.Point(194, 264);
this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(130, 44); this.buttonCancel.Size = new System.Drawing.Size(130, 44);
this.buttonCancel.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.buttonCancel.TabIndex = 3; this.buttonCancel.TabIndex = 3;
this.buttonCancel.TabStop = false; this.buttonCancel.TabStop = false;
this.buttonCancel.Visible = false; this.buttonCancel.Visible = false;

View File

@ -46,8 +46,19 @@
</Grid> </Grid>
<GroupBox Header="Modifications" VerticalAlignment="Top" Margin="10,5,10,0"> <GroupBox Header="Modifications" VerticalAlignment="Top" Margin="10,5,10,0">
<StackPanel VerticalAlignment="Center"> <StackPanel VerticalAlignment="Center">
<CheckBox x:Name="CheckBoxModDeathSound" Content=" Use old death sound" Margin="5" IsChecked="{Binding ModOldDeathSound, Mode=TwoWay}" /> <Grid>
<CheckBox x:Name="CheckBoxModMouseCursor" Content=" Use old mouse cursor" Margin="5" IsChecked="{Binding ModOldMouseCursor, Mode=TwoWay}" /> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" VerticalAlignment="Top">
<CheckBox x:Name="CheckBoxModDeathSound" Content=" Use old death sound" Margin="5" IsChecked="{Binding ModOldDeathSound, Mode=TwoWay}" />
<CheckBox x:Name="CheckBoxModMouseCursor" Content=" Use old mouse cursor" Margin="5" IsChecked="{Binding ModOldMouseCursor, Mode=TwoWay}" />
</StackPanel>
<StackPanel Grid.Column="1" VerticalAlignment="Top">
<CheckBox x:Name="CheckBoxDisableAppPatch" Content=" Disable desktop app" Margin="5" IsChecked="{Binding ModDisableAppPatch, Mode=TwoWay}" />
</StackPanel>
</Grid>
<Button x:Name="ButtonOpenModFolder" Content="{Binding ModFolderButtonText, Mode=OneTime}" IsEnabled="{Binding ModFolderButtonEnabled, Mode=OneTime}" VerticalAlignment="Bottom" Height="23" Margin="5,5,5,5" Click="ButtonOpenModFolder_Click" /> <Button x:Name="ButtonOpenModFolder" Content="{Binding ModFolderButtonText, Mode=OneTime}" IsEnabled="{Binding ModFolderButtonEnabled, Mode=OneTime}" VerticalAlignment="Bottom" Height="23" Margin="5,5,5,5" Click="ButtonOpenModFolder_Click" />
</StackPanel> </StackPanel>
</GroupBox> </GroupBox>

View File

@ -199,6 +199,12 @@ namespace Bloxstrap.Dialogs
set => Program.Settings.UseOldMouseCursor = value; set => Program.Settings.UseOldMouseCursor = value;
} }
public bool ModDisableAppPatch
{
get => Program.Settings.UseDisableAppPatch;
set => Program.Settings.UseDisableAppPatch = value;
}
public bool ModFolderButtonEnabled { get; } = !Program.IsFirstRun; public bool ModFolderButtonEnabled { get; } = !Program.IsFirstRun;
public string ModFolderButtonText { get; } = Program.IsFirstRun ? "Custom mods can be added after installing Bloxstrap" : "Open mod folder"; public string ModFolderButtonText { get; } = Program.IsFirstRun ? "Custom mods can be added after installing Bloxstrap" : "Open mod folder";
#endregion #endregion

View File

@ -21,5 +21,6 @@ namespace Bloxstrap.Models
public bool UseOldDeathSound { get; set; } = true; public bool UseOldDeathSound { get; set; } = true;
public bool UseOldMouseCursor { get; set; } = false; public bool UseOldMouseCursor { get; set; } = false;
public bool UseDisableAppPatch { get; set; } = false;
} }
} }

View File

@ -128,7 +128,10 @@ namespace Bloxstrap
} }
else else
{ {
commandLine = "--app"; if (Settings.UseDisableAppPatch)
Utilities.OpenWebsite("https://www.roblox.com/games");
else
commandLine = "--app";
} }
#endif #endif