bloxstrap/Bloxstrap/Views/Pages/IntegrationsPage.xaml

140 lines
9.3 KiB
XML

<ui:UiPage x:Class="Bloxstrap.Views.Pages.IntegrationsPage"
x:Name="IntegrationsPageView"
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:models="clr-namespace:Bloxstrap.ViewModels"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
mc:Ignorable="d"
d:DesignHeight="680" d:DesignWidth="800"
Title="IntegrationsPage"
Scrollable="True">
<StackPanel Margin="0,0,14,14">
<TextBlock Text="Configure quick and easy ways to improve the Roblox gameplay experience." FontSize="14" Foreground="{DynamicResource TextFillColorSecondaryBrush}" />
<TextBlock Text="Discord Rich Presence" FontSize="16" FontWeight="Medium" Margin="0,16,0,0" />
<ui:CardControl Margin="0,8,0,0">
<ui:CardControl.Header>
<StackPanel Grid.Column="0">
<TextBlock FontSize="13" FontWeight="Medium" Text="Show game activity" />
<TextBlock FontSize="12" Text="The game you're playing on Roblox will show on your Discord activity." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
</StackPanel>
</ui:CardControl.Header>
<ui:ToggleSwitch x:Name="DiscordActivityEnabledToggle" IsChecked="{Binding DiscordActivityEnabled, Mode=TwoWay}" />
</ui:CardControl>
<ui:CardControl Margin="0,8,0,0" IsEnabled="{Binding IsChecked, ElementName=DiscordActivityEnabledToggle, Mode=OneWay}">
<ui:CardControl.Header>
<StackPanel Grid.Column="0">
<TextBlock FontSize="13" FontWeight="Medium" Text="Allow activity joining" />
<TextBlock FontSize="12" Text="When enabled, anyone can join your game through your Discord activity." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
</StackPanel>
</ui:CardControl.Header>
<ui:ToggleSwitch IsChecked="{Binding DiscordActivityJoinEnabled, Mode=TwoWay}" />
</ui:CardControl>
<TextBlock Text="ReShade" FontSize="16" FontWeight="Medium" Margin="0,16,0,0" />
<ui:CardControl Margin="0,8,0,0">
<ui:CardControl.Header>
<StackPanel Grid.Column="0">
<TextBlock FontSize="13" FontWeight="Medium" Text="Use ReShade" />
<TextBlock FontSize="12" Text="Reshade is a post-processing injector that enables the use of shaders." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
</StackPanel>
</ui:CardControl.Header>
<ui:ToggleSwitch x:Name="ReShadeEnabledToggle" IsChecked="{Binding ReShadeEnabled, Mode=TwoWay}" />
</ui:CardControl>
<ui:CardControl Margin="0,8,0,0" IsEnabled="{Binding IsChecked, ElementName=ReShadeEnabledToggle, Mode=OneWay}">
<ui:CardControl.Header>
<StackPanel Grid.Column="0">
<TextBlock FontSize="13" FontWeight="Medium" Text="Use Extravi's shader presets" />
<TextBlock FontSize="12" Text="ReShade presets made specifically for Roblox that enhance your graphics." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
</StackPanel>
</ui:CardControl.Header>
<ui:ToggleSwitch IsChecked="{Binding ReShadePresetsEnabled, Mode=TwoWay}" />
</ui:CardControl>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ui:CardAction Grid.Column="0" Margin="0,8,4,0" Icon="Folder24" Command="{Binding OpenReShadeFolderCommand}" IsEnabled="{Binding CanOpenReShadeFolder}">
<StackPanel>
<TextBlock FontSize="13" FontWeight="Medium" Text="Open ReShade Folder">
<!--this is so fucking stupid the disabled state of the cardaction doesnt change the header text colour-->
<TextBlock.Style>
<Style>
<Style.Triggers>
<DataTrigger Binding="{Binding CanOpenReShadeFolder}" Value="False">
<Setter Property="TextBlock.Foreground" Value="{DynamicResource TextFillColorDisabledBrush}" />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock FontSize="12" Foreground="{DynamicResource TextFillColorTertiaryBrush}">
<TextBlock.Style>
<Style>
<Setter Property="TextBlock.Text" Value="Where ReShade's resources are stored." />
<Style.Triggers>
<DataTrigger Binding="{Binding CanOpenReShadeFolder}" Value="False">
<Setter Property="TextBlock.Text" Value="Please launch Roblox with ReShade first." />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</StackPanel>
</ui:CardAction>
<ui:CardAction Grid.Column="1" Margin="4,8,0,0" Icon="BookQuestionMark24" Command="models:GlobalViewModel.OpenWebpageCommand" CommandParameter="https://github.com/pizzaboxer/bloxstrap/wiki/Using-ReShade">
<StackPanel>
<TextBlock FontSize="13" FontWeight="Medium" Text="Help" />
<TextBlock FontSize="12" Text="See info about using ReShade." Padding="0,0,16,0" Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
</StackPanel>
</ui:CardAction>
</Grid>
<StackPanel x:Name="RbxFpsUnlockerOptions">
<TextBlock Text="FPS Unlocking" FontSize="16" FontWeight="Medium" Margin="0,16,0,0" />
<ui:CardControl Margin="0,8,0,0">
<ui:CardControl.Header>
<StackPanel Grid.Column="0">
<TextBlock FontSize="13" FontWeight="Medium" Text="Use axstin's rbxfpsunlocker" />
<TextBlock FontSize="12" Text="rbxfpsunlocker removes Roblox's 60FPS cap and will launch alongside Roblox." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
</StackPanel>
</ui:CardControl.Header>
<ui:ToggleSwitch x:Name="RbxFpsUnlockerEnabledToggle" IsChecked="{Binding RbxFpsUnlockerEnabled, Mode=TwoWay}" />
</ui:CardControl>
<ui:CardControl Margin="0,8,0,0" IsEnabled="{Binding IsChecked, ElementName=RbxFpsUnlockerEnabledToggle, Mode=OneWay}">
<ui:CardControl.Header>
<StackPanel Grid.Column="0">
<TextBlock FontSize="13" FontWeight="Medium" Text="Stop when Roblox closes" />
<TextBlock FontSize="12" Text="rbxfpsunlocker will automatically close when Roblox closes." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
</StackPanel>
</ui:CardControl.Header>
<ui:ToggleSwitch IsChecked="{Binding RbxFpsUnlockerAutocloseEnabled, Mode=TwoWay}" />
</ui:CardControl>
</StackPanel>
<TextBlock Text="Custom Integrations" FontSize="16" FontWeight="Medium" Margin="0,16,0,0" />
<TextBlock Margin="0,4,0,0" TextWrapping="Wrap">
Using custom integrations, you can have other programs launch with Roblox automatically like how rbxfpsunlocker does.<LineBreak />
To manage custom integrations, you'll have to manually edit your Settings.json configuration file in your Bloxstrap folder. If you have any configured, you'll be able to preview them here.
</TextBlock>
<Grid Margin="0,8,0,0" Visibility="{Binding CustomIntegrationsVisibility}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="250" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ListBox ItemsSource="{Binding CustomIntegrations}" SelectionChanged="CustomIntegrationSelection" SelectedIndex="0"/>
<StackPanel Grid.Column="1" Margin="8,0,0,0">
<TextBlock FontSize="13" FontWeight="Medium" Text="Application Location" />
<TextBlock Text="{Binding SelectedCustomIntegration.Location}" Foreground="{DynamicResource TextFillColorSecondaryBrush}" />
<TextBlock Margin="0,8,0,0" FontSize="13" FontWeight="Medium" Text="Launch Arguments" />
<TextBlock Text="{Binding SelectedCustomIntegration.LaunchArgs}" Foreground="{DynamicResource TextFillColorSecondaryBrush}" />
<TextBlock Margin="0,8,0,0" FontSize="13" FontWeight="Medium" Text="Auto close when Roblox closes" />
<TextBlock Text="{Binding SelectedCustomIntegration.AutoClose}" Foreground="{DynamicResource TextFillColorSecondaryBrush}" />
</StackPanel>
</Grid>
</StackPanel>
</ui:UiPage>