Skip to content

Commit

Permalink
Add ability to set old avatar editor scene (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
pizzaboxer committed Jul 15, 2023
1 parent e4dc6c0 commit f553a81
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 8 deletions.
1 change: 1 addition & 0 deletions Bloxstrap/Bloxstrap.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<EmbeddedResource Include="Resources\Mods\Cursor\From2013\ArrowCursor.png" />
<EmbeddedResource Include="Resources\Mods\Cursor\From2013\ArrowFarCursor.png" />
<EmbeddedResource Include="Resources\Mods\Empty.mp3" />
<EmbeddedResource Include="Resources\Mods\OldAvatarBackground.rbxl" />
<EmbeddedResource Include="Resources\Mods\OldDeath.ogg" />
<EmbeddedResource Include="Resources\Mods\OldJump.mp3" />
<EmbeddedResource Include="Resources\Mods\OldWalk.mp3" />
Expand Down
7 changes: 5 additions & 2 deletions Bloxstrap/Bootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,8 @@ private async Task ApplyModifications()
if (!Directory.Exists(modFolder))
Directory.CreateDirectory(modFolder);

bool appDisabled = App.Settings.Prop.UseDisableAppPatch && !_launchCommandLine.Contains("--deeplink");

// cursors
await CheckModPreset(App.Settings.Prop.CursorType == CursorType.From2006, @"content\textures\Cursors\KeyboardMouse\ArrowCursor.png", "Cursor.From2006.ArrowCursor.png");
await CheckModPreset(App.Settings.Prop.CursorType == CursorType.From2006, @"content\textures\Cursors\KeyboardMouse\ArrowFarCursor.png", "Cursor.From2006.ArrowFarCursor.png");
Expand All @@ -1014,8 +1016,9 @@ private async Task ApplyModifications()
await CheckModPreset(App.Settings.Prop.UseOldCharacterSounds, @"content\sounds\impact_water.mp3", "Empty.mp3");
await CheckModPreset(App.Settings.Prop.UseOldDeathSound, @"content\sounds\ouch.ogg", "OldDeath.ogg");

// misc
await CheckModPreset(App.Settings.Prop.UseDisableAppPatch && !_launchCommandLine.Contains("--deeplink"), @"ExtraContent\places\Mobile.rbxl", "");
// Mobile.rbxl
await CheckModPreset(appDisabled, @"ExtraContent\places\Mobile.rbxl", "");
await CheckModPreset(App.Settings.Prop.UseOldAvatarBackground && !appDisabled, @"ExtraContent\places\Mobile.rbxl", "OldAvatarBackground.rbxl");

// emoji presets are downloaded remotely from github due to how large they are
string contentFonts = Path.Combine(Directories.Modifications, "content\\fonts");
Expand Down
1 change: 1 addition & 0 deletions Bloxstrap/Models/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class Settings
public bool UseOldDeathSound { get; set; } = true;
public bool UseOldCharacterSounds { get; set; } = false;
public bool UseDisableAppPatch { get; set; } = false;
public bool UseOldAvatarBackground { get; set; } = false;
public CursorType CursorType { get; set; } = CursorType.Default;
public EmojiType EmojiType { get; set; } = EmojiType.Default;
public bool DisableFullscreenOptimizations { get; set; } = false;
Expand Down
Binary file not shown.
22 changes: 16 additions & 6 deletions Bloxstrap/UI/Elements/Menu/Pages/ModsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

<TextBlock Text="Presets" FontSize="16" FontWeight="Medium" Margin="0,16,0,0" />

<ui:CardControl Grid.Row="0" Grid.Column="0" Margin="0,8,0,0">
<ui:CardControl Margin="0,8,0,0">
<ui:CardControl.Header>
<StackPanel>
<TextBlock FontSize="14" Text="Use old death sound" />
Expand All @@ -71,17 +71,27 @@
<ui:ToggleSwitch IsChecked="{Binding OldDeathSoundEnabled, Mode=TwoWay}" />
</ui:CardControl>

<ui:CardControl Grid.Row="0" Grid.Column="1" Margin="0,8,0,0">
<ui:CardControl Margin="0,8,0,0">
<ui:CardControl.Header>
<StackPanel>
<TextBlock FontSize="14" Text="Preferred mouse cursor" />
<TextBlock FontSize="14" Text="Mouse cursor" />
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Choose between using two classic Roblox cursor styles." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
</StackPanel>
</ui:CardControl.Header>
<ComboBox Margin="5,0,0,0" Padding="10,5,10,5" Width="200" ItemsSource="{Binding CursorTypes.Keys, Mode=OneTime}" Text="{Binding SelectedCursorType, Mode=TwoWay}" />
</ui:CardControl>

<ui:CardControl Grid.Row="1" Grid.ColumnSpan="2" Margin="0,8,0,0">
<ui:CardControl Margin="0,8,0,0">
<ui:CardControl.Header>
<StackPanel>
<TextBlock FontSize="14" Text="Use old avatar editor background" />
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Bring back the old avatar editor background used in the Roblox app prior to 2017." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
</StackPanel>
</ui:CardControl.Header>
<ui:ToggleSwitch IsChecked="{Binding OldAvatarBackground, Mode=TwoWay}" />
</ui:CardControl>

<ui:CardControl Margin="0,8,0,0">
<ui:CardControl.Header>
<StackPanel>
<TextBlock FontSize="14" Text="Emulate old character sounds" />
Expand All @@ -91,7 +101,7 @@
<ui:ToggleSwitch IsChecked="{Binding OldCharacterSoundsEnabled, Mode=TwoWay}" />
</ui:CardControl>

<ui:CardControl Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,8,0,0">
<ui:CardControl Margin="0,8,0,0">
<ui:CardControl.Header>
<StackPanel>
<TextBlock FontSize="14" Text="Disable desktop app" />
Expand All @@ -101,7 +111,7 @@
<ui:ToggleSwitch IsChecked="{Binding DisableAppPatchEnabled, Mode=TwoWay}" />
</ui:CardControl>

<ui:CardControl Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,8,0,0">
<ui:CardControl Margin="0,8,0,0">
<ui:CardControl.Header>
<StackPanel>
<TextBlock FontSize="14" Text="Preferred emoji type" />
Expand Down
6 changes: 6 additions & 0 deletions Bloxstrap/UI/ViewModels/Menu/ModsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ public string SelectedCursorType
set => App.Settings.Prop.CursorType = CursorTypes[value];
}

public bool OldAvatarBackground
{
get => App.Settings.Prop.UseOldAvatarBackground;
set => App.Settings.Prop.UseOldAvatarBackground = value;
}

public bool DisableAppPatchEnabled
{
get => App.Settings.Prop.UseDisableAppPatch;
Expand Down

0 comments on commit f553a81

Please sign in to comment.