Add help button to FastFlags menu tab

This commit is contained in:
pizzaboxer 2023-07-21 00:04:18 +01:00
parent 5c267c7395
commit 62b4897bcc
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8

View File

@ -10,36 +10,50 @@
Title="FastFlagsPage" Title="FastFlagsPage"
Scrollable="True"> Scrollable="True">
<StackPanel Margin="0,0,14,14"> <StackPanel Margin="0,0,14,14">
<TextBlock Text="Control how specific Roblox engine parameters and features are configured." FontSize="14" Foreground="{DynamicResource TextFillColorSecondaryBrush}" /> <TextBlock Margin="0,0,0,16" Text="Control how specific Roblox engine parameters and features are configured." FontSize="14" Foreground="{DynamicResource TextFillColorSecondaryBrush}" />
<ui:CardAction x:Name="OpenClientSettingsCardAction" Grid.Row="1" Grid.ColumnSpan="2" Margin="0,16,0,0" Icon="DocumentEdit24" Command="{Binding OpenClientSettingsCommand}" IsEnabled="{Binding Source={x:Static models:GlobalViewModel.IsNotFirstRun}, Mode=OneTime}"> <Grid>
<StackPanel> <Grid.ColumnDefinitions>
<TextBlock FontSize="14" Text="Edit ClientAppSettings.json"> <ColumnDefinition Width="Auto" />
<!--this is so fucking stupid the disabled state of the cardaction doesnt change the header text colour--> <ColumnDefinition Width="*" />
<TextBlock.Style> </Grid.ColumnDefinitions>
<Style>
<Style.Triggers> <ui:CardAction x:Name="OpenClientSettingsCardAction" Grid.Column="0" Margin="0,0,4,0" Icon="DocumentEdit24" Command="{Binding OpenClientSettingsCommand}" IsEnabled="{Binding Source={x:Static models:GlobalViewModel.IsNotFirstRun}, Mode=OneTime}">
<DataTrigger Binding="{Binding ElementName=OpenClientSettingsCardAction, Path=IsEnabled, Mode=OneTime}" Value="False"> <StackPanel>
<Setter Property="TextBlock.Foreground" Value="{DynamicResource TextFillColorDisabledBrush}" /> <TextBlock FontSize="14" Text="Edit ClientAppSettings.json">
</DataTrigger> <!--this is so fucking stupid the disabled state of the cardaction doesnt change the header text colour-->
</Style.Triggers> <TextBlock.Style>
</Style> <Style>
</TextBlock.Style> <Style.Triggers>
</TextBlock> <DataTrigger Binding="{Binding ElementName=OpenClientSettingsCardAction, Path=IsEnabled, Mode=OneTime}" Value="False">
<TextBlock Margin="0,2,0,0" FontSize="12" Foreground="{DynamicResource TextFillColorTertiaryBrush}"> <Setter Property="TextBlock.Foreground" Value="{DynamicResource TextFillColorDisabledBrush}" />
<TextBlock.Style> </DataTrigger>
<Style> </Style.Triggers>
<Setter Property="TextBlock.Text" Value="Where all FastFlags are saved to. Use this to manage your own flags."/> </Style>
<Style.Triggers> </TextBlock.Style>
<DataTrigger Binding="{Binding ElementName=OpenClientSettingsCardAction, Path=IsEnabled, Mode=OneTime}" Value="False"> </TextBlock>
<Setter Property="TextBlock.Text" Value="Bloxstrap must first be installed." /> <TextBlock Margin="0,2,0,0" FontSize="12" Foreground="{DynamicResource TextFillColorTertiaryBrush}">
</DataTrigger> <TextBlock.Style>
</Style.Triggers> <Style>
</Style> <Setter Property="TextBlock.Text" Value="Where all FastFlags are saved. Manage your own flags here."/>
</TextBlock.Style> <Style.Triggers>
</TextBlock> <DataTrigger Binding="{Binding ElementName=OpenClientSettingsCardAction, Path=IsEnabled, Mode=OneTime}" Value="False">
</StackPanel> <Setter Property="TextBlock.Text" Value="Bloxstrap must first be installed." />
</ui:CardAction> </DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</StackPanel>
</ui:CardAction>
<ui:CardAction Grid.Column="1" Margin="4,0,0,0" Icon="BookQuestionMark24" Command="models:GlobalViewModel.OpenWebpageCommand" CommandParameter="https://github.com/pizzaboxer/bloxstrap/wiki/A-guide-to-FastFlags">
<StackPanel>
<TextBlock FontSize="14" Text="Help" />
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Learn more about FastFlags." Padding="0,0,16,0" Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
</StackPanel>
</ui:CardAction>
</Grid>
<StackPanel Visibility="{Binding ShowDebugFlags, Mode=OneTime}"> <StackPanel Visibility="{Binding ShowDebugFlags, Mode=OneTime}">
<TextBlock Text="Debug" FontSize="16" FontWeight="Medium" Margin="0,16,0,0" /> <TextBlock Text="Debug" FontSize="16" FontWeight="Medium" Margin="0,16,0,0" />