Split Behaviour page

This commit is contained in:
pizzaboxer 2024-09-30 18:36:55 +01:00
parent 84da94c3f2
commit 40b03a97b9
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8
9 changed files with 76 additions and 17 deletions

View File

@ -2056,7 +2056,7 @@ namespace Bloxstrap.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Configure what Bloxstrap should do when launching.. /// Looks up a localized string similar to Configure what Bloxstrap should do when launching Roblox..
/// </summary> /// </summary>
public static string Menu_Behaviour_Description { public static string Menu_Behaviour_Description {
get { get {
@ -2101,7 +2101,7 @@ namespace Bloxstrap.Resources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Behaviour. /// Looks up a localized string similar to Bootstrapper.
/// </summary> /// </summary>
public static string Menu_Behaviour_Title { public static string Menu_Behaviour_Title {
get { get {
@ -2109,6 +2109,15 @@ namespace Bloxstrap.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Configure options related to Bloxstrap&apos;s behaviour itself..
/// </summary>
public static string Menu_Bloxstrap_Description {
get {
return ResourceManager.GetString("Menu.Bloxstrap.Description", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Add new. /// Looks up a localized string similar to Add new.
/// </summary> /// </summary>

View File

@ -537,7 +537,7 @@ Would you like to upgrade your currently installed version?</value>
<value>Prompt to confirm when launching another Roblox instance</value> <value>Prompt to confirm when launching another Roblox instance</value>
</data> </data>
<data name="Menu.Behaviour.Description" xml:space="preserve"> <data name="Menu.Behaviour.Description" xml:space="preserve">
<value>Configure what Bloxstrap should do when launching.</value> <value>Configure what Bloxstrap should do when launching Roblox.</value>
</data> </data>
<data name="Menu.Behaviour.ForceRobloxReinstall.Description" xml:space="preserve"> <data name="Menu.Behaviour.ForceRobloxReinstall.Description" xml:space="preserve">
<value>Roblox will be installed fresh on next launch.</value> <value>Roblox will be installed fresh on next launch.</value>
@ -546,7 +546,7 @@ Would you like to upgrade your currently installed version?</value>
<value>Force Roblox reinstallation</value> <value>Force Roblox reinstallation</value>
</data> </data>
<data name="Menu.Behaviour.Title" xml:space="preserve"> <data name="Menu.Behaviour.Title" xml:space="preserve">
<value>Behaviour</value> <value>Bootstrapper</value>
</data> </data>
<data name="Menu.FastFlagEditor.AddNew" xml:space="preserve"> <data name="Menu.FastFlagEditor.AddNew" xml:space="preserve">
<value>Add new</value> <value>Add new</value>
@ -1219,4 +1219,7 @@ Please manually delete Bloxstrap.exe from the install location or try restarting
<data name="About.Supporters.OneOff" xml:space="preserve"> <data name="About.Supporters.OneOff" xml:space="preserve">
<value>One-off</value> <value>One-off</value>
</data> </data>
<data name="Menu.Bloxstrap.Description" xml:space="preserve">
<value>Configure options related to Bloxstrap's behaviour itself.</value>
</data>
</root> </root>

View File

@ -51,16 +51,17 @@
<ui:NavigationFluent x:Name="RootNavigation" Grid.Row="1" Grid.Column="0" Margin="0,0,12,0" Frame="{Binding ElementName=RootFrame}" SelectedPageIndex="0"> <ui:NavigationFluent x:Name="RootNavigation" Grid.Row="1" Grid.Column="0" Margin="0,0,12,0" Frame="{Binding ElementName=RootFrame}" SelectedPageIndex="0">
<ui:NavigationFluent.Items> <ui:NavigationFluent.Items>
<ui:NavigationItem Content="{x:Static resources:Strings.Menu_Integrations_Title}" PageType="{x:Type pages:IntegrationsPage}" Icon="Add28" Tag="integrations" /> <ui:NavigationItem Content="{x:Static resources:Strings.Menu_Integrations_Title}" PageType="{x:Type pages:IntegrationsPage}" Icon="Add28" Tag="integrations" />
<ui:NavigationItem Content="{x:Static resources:Strings.Menu_Behaviour_Title}" PageType="{x:Type pages:BehaviourPage}" Icon="PlaySettings20" Tag="bootstrapper" />
<ui:NavigationItem Content="{x:Static resources:Strings.Menu_Mods_Title}" PageType="{x:Type pages:ModsPage}" Icon="WrenchScrewdriver20" Tag="mods" /> <ui:NavigationItem Content="{x:Static resources:Strings.Menu_Mods_Title}" PageType="{x:Type pages:ModsPage}" Icon="WrenchScrewdriver20" Tag="mods" />
<ui:NavigationItem Content="{x:Static resources:Strings.Menu_FastFlags_Title}" PageType="{x:Type pages:FastFlagsPage}" Icon="Flag24" Tag="fastflags" /> <ui:NavigationItem Content="{x:Static resources:Strings.Menu_FastFlags_Title}" PageType="{x:Type pages:FastFlagsPage}" Icon="Flag24" Tag="fastflags" />
<ui:NavigationItem Content="{x:Static resources:Strings.Menu_Appearance_Title}" PageType="{x:Type pages:AppearancePage}" Icon="PaintBrush24" Tag="appearance" /> <ui:NavigationItem Content="{x:Static resources:Strings.Menu_Appearance_Title}" PageType="{x:Type pages:AppearancePage}" Icon="PaintBrush24" Tag="appearance" />
<ui:NavigationItem Content="{x:Static resources:Strings.Menu_Behaviour_Title}" PageType="{x:Type pages:BehaviourPage}" Icon="Settings24" Tag="behaviour" />
<ui:NavigationItem Content="{x:Static resources:Strings.Common_Shortcuts}" PageType="{x:Type pages:ShortcutsPage}" Icon="Apps28" Tag="shortcuts" /> <ui:NavigationItem Content="{x:Static resources:Strings.Common_Shortcuts}" PageType="{x:Type pages:ShortcutsPage}" Icon="Apps28" Tag="shortcuts" />
<ui:NavigationItem Content="{x:Static resources:Strings.Menu_FastFlagEditor_Title}" PageType="{x:Type pages:FastFlagEditorPage}" Tag="fastflageditor" Visibility="Collapsed" /> <ui:NavigationItem Content="{x:Static resources:Strings.Menu_FastFlagEditor_Title}" PageType="{x:Type pages:FastFlagEditorPage}" Tag="fastflageditor" Visibility="Collapsed" />
<ui:NavigationItem Content="" PageType="{x:Type pages:FastFlagEditorWarningPage}" Tag="fastflageditorwarning" Visibility="Collapsed" x:Name="EditorWarningNavItem" /> <ui:NavigationItem Content="" PageType="{x:Type pages:FastFlagEditorWarningPage}" Tag="fastflageditorwarning" Visibility="Collapsed" x:Name="EditorWarningNavItem" />
</ui:NavigationFluent.Items> </ui:NavigationFluent.Items>
<ui:NavigationFluent.Footer> <ui:NavigationFluent.Footer>
<ui:NavigationItem Content="Bloxstrap" PageType="{x:Type pages:BloxstrapPage}" Icon="Settings24" Tag="shortcuts" />
<ui:NavigationItem Content="{x:Static resources:Strings.Menu_About_Title}" Icon="QuestionCircle48" Margin="0,0,0,12" Command="{Binding OpenAboutCommand, Mode=OneTime}" /> <ui:NavigationItem Content="{x:Static resources:Strings.Menu_About_Title}" Icon="QuestionCircle48" Margin="0,0,0,12" Command="{Binding OpenAboutCommand, Mode=OneTime}" />
</ui:NavigationFluent.Footer> </ui:NavigationFluent.Footer>
</ui:NavigationFluent> </ui:NavigationFluent>

View File

@ -0,0 +1,26 @@
<ui:UiPage x:Class="Bloxstrap.UI.Elements.Settings.Pages.BloxstrapPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:local="clr-namespace:Bloxstrap.UI.Elements.Settings.Pages"
xmlns:controls="clr-namespace:Bloxstrap.UI.Elements.Controls"
xmlns:models="clr-namespace:Bloxstrap.UI.ViewModels.Settings"
xmlns:resources="clr-namespace:Bloxstrap.Resources"
d:DataContext="{d:DesignInstance Type=models:BehaviourViewModel}"
mc:Ignorable="d"
d:DesignHeight="600" d:DesignWidth="800"
Title="BehaviourPage"
Scrollable="True">
<StackPanel Margin="0,0,14,14">
<TextBlock Margin="0,0,0,8" Text="{x:Static resources:Strings.Menu_Bloxstrap_Description}" FontSize="14" Foreground="{DynamicResource TextFillColorSecondaryBrush}" />
<controls:OptionControl
Header="{x:Static resources:Strings.Menu_Behaviour_AutoUpdate_Title}"
Description="{x:Static resources:Strings.Menu_Behaviour_AutoUpdate_Description}">
<ui:ToggleSwitch IsChecked="{Binding UpdateCheckingEnabled, Mode=TwoWay}" />
</controls:OptionControl>
</StackPanel>
</ui:UiPage>

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Bloxstrap.UI.ViewModels.Settings;
namespace Bloxstrap.UI.Elements.Settings.Pages
{
/// <summary>
/// Interaction logic for BloxstrapPage.xaml
/// </summary>
public partial class BloxstrapPage
{
public BloxstrapPage()
{
DataContext = new BloxstrapViewModel();
InitializeComponent();
}
}
}

View File

@ -17,12 +17,6 @@
<StackPanel Margin="0,0,14,14"> <StackPanel Margin="0,0,14,14">
<TextBlock Margin="0,0,0,8" Text="{x:Static resources:Strings.Menu_Behaviour_Description}" FontSize="14" Foreground="{DynamicResource TextFillColorSecondaryBrush}" /> <TextBlock Margin="0,0,0,8" Text="{x:Static resources:Strings.Menu_Behaviour_Description}" FontSize="14" Foreground="{DynamicResource TextFillColorSecondaryBrush}" />
<controls:OptionControl
Header="{x:Static resources:Strings.Menu_Behaviour_AutoUpdate_Title}"
Description="{x:Static resources:Strings.Menu_Behaviour_AutoUpdate_Description}">
<ui:ToggleSwitch IsChecked="{Binding UpdateCheckingEnabled, Mode=TwoWay}" />
</controls:OptionControl>
<controls:OptionControl <controls:OptionControl
Header="{x:Static resources:Strings.Menu_Behaviour_ConfirmLaunches_Title}" Header="{x:Static resources:Strings.Menu_Behaviour_ConfirmLaunches_Title}"
Description="{x:Static resources:Strings.Menu_Behaviour_ConfirmLaunches_Description}"> Description="{x:Static resources:Strings.Menu_Behaviour_ConfirmLaunches_Description}">

View File

@ -5,12 +5,6 @@
private string _oldPlayerVersionGuid = ""; private string _oldPlayerVersionGuid = "";
private string _oldStudioVersionGuid = ""; private string _oldStudioVersionGuid = "";
public bool UpdateCheckingEnabled
{
get => App.Settings.Prop.CheckForUpdates;
set => App.Settings.Prop.CheckForUpdates = value;
}
public bool ConfirmLaunches public bool ConfirmLaunches
{ {
get => App.Settings.Prop.ConfirmLaunches; get => App.Settings.Prop.ConfirmLaunches;

View File

@ -0,0 +1,11 @@
namespace Bloxstrap.UI.ViewModels.Settings
{
public class BloxstrapViewModel : NotifyPropertyChangedViewModel
{
public bool UpdateCheckingEnabled
{
get => App.Settings.Prop.CheckForUpdates;
set => App.Settings.Prop.CheckForUpdates = value;
}
}
}