|
| 1 | +<UserControl x:Class="IUUT.App.Views.GameTunerView" |
| 2 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 5 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 6 | + mc:Ignorable="d"> |
| 7 | + |
| 8 | + <!-- Game Tuner (master §20.1, docs/GAME-TUNING.md). DataContext = GameTunerViewModel. --> |
| 9 | + <Grid> |
| 10 | + <Grid.RowDefinitions> |
| 11 | + <RowDefinition Height="Auto" /> |
| 12 | + <RowDefinition Height="*" /> |
| 13 | + <RowDefinition Height="Auto" /> |
| 14 | + </Grid.RowDefinitions> |
| 15 | + |
| 16 | + <!-- Header --> |
| 17 | + <Border Grid.Row="0" Style="{StaticResource GlassCard}" Padding="16"> |
| 18 | + <Grid> |
| 19 | + <Grid.ColumnDefinitions> |
| 20 | + <ColumnDefinition Width="*" /> |
| 21 | + <ColumnDefinition Width="Auto" /> |
| 22 | + </Grid.ColumnDefinitions> |
| 23 | + <StackPanel Grid.Column="0"> |
| 24 | + <TextBlock Text="⚙ Game Tuner" Style="{StaticResource TitleText}" /> |
| 25 | + <TextBlock Text="Engine.ini performance & visual tweaks — toggle effects off, set quality/FPS. Standard Unreal cvars; restart Icarus to apply. A backup is taken before any write." |
| 26 | + Style="{StaticResource MutedText}" TextWrapping="Wrap" Margin="0,4,0,0" /> |
| 27 | + <TextBlock Text="{Binding EngineIniPath}" Style="{StaticResource MonoText}" Margin="0,6,0,0" TextTrimming="CharacterEllipsis" /> |
| 28 | + </StackPanel> |
| 29 | + <Button Grid.Column="1" Content="Reload" Command="{Binding LoadCommand}" VerticalAlignment="Top" Padding="14,4" /> |
| 30 | + </Grid> |
| 31 | + </Border> |
| 32 | + |
| 33 | + <!-- Settings list --> |
| 34 | + <Border Grid.Row="1" Style="{StaticResource GlassCard}" Padding="12" Margin="0,12,0,0"> |
| 35 | + <ScrollViewer VerticalScrollBarVisibility="Auto"> |
| 36 | + <ItemsControl ItemsSource="{Binding Settings}"> |
| 37 | + <ItemsControl.ItemTemplate> |
| 38 | + <DataTemplate> |
| 39 | + <Border Margin="0,0,0,8" Padding="14,10" CornerRadius="4" |
| 40 | + Background="{StaticResource DataBackdropBrush}" |
| 41 | + BorderBrush="{StaticResource GlassStrokeBrush}" BorderThickness="1"> |
| 42 | + <Grid> |
| 43 | + <Grid.ColumnDefinitions> |
| 44 | + <ColumnDefinition Width="*" /> |
| 45 | + <ColumnDefinition Width="Auto" /> |
| 46 | + <ColumnDefinition Width="Auto" /> |
| 47 | + </Grid.ColumnDefinitions> |
| 48 | + |
| 49 | + <StackPanel Grid.Column="0" VerticalAlignment="Center" Margin="0,0,12,0"> |
| 50 | + <TextBlock Text="{Binding Label}" Style="{StaticResource BodyText}" /> |
| 51 | + <TextBlock Text="{Binding Description}" Style="{StaticResource MutedText}" TextWrapping="Wrap" Margin="0,2,0,0" /> |
| 52 | + </StackPanel> |
| 53 | + |
| 54 | + <CheckBox Grid.Column="1" IsChecked="{Binding Enabled, Mode=TwoWay}" VerticalAlignment="Center" Margin="0,0,16,0" /> |
| 55 | + |
| 56 | + <StackPanel Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center"> |
| 57 | + <StackPanel.Style> |
| 58 | + <Style TargetType="StackPanel"> |
| 59 | + <Setter Property="Visibility" Value="Visible" /> |
| 60 | + <Style.Triggers> |
| 61 | + <DataTrigger Binding="{Binding IsNumber}" Value="False"> |
| 62 | + <Setter Property="Visibility" Value="Collapsed" /> |
| 63 | + </DataTrigger> |
| 64 | + </Style.Triggers> |
| 65 | + </Style> |
| 66 | + </StackPanel.Style> |
| 67 | + <Slider Width="150" VerticalAlignment="Center" |
| 68 | + Minimum="{Binding Minimum}" Maximum="{Binding Maximum}" |
| 69 | + Value="{Binding Value, Mode=TwoWay}" |
| 70 | + TickFrequency="{Binding Step}" IsSnapToTickEnabled="True" |
| 71 | + IsEnabled="{Binding Enabled}" /> |
| 72 | + <TextBox Width="62" Margin="10,0,4,0" VerticalAlignment="Center" |
| 73 | + Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" |
| 74 | + IsEnabled="{Binding Enabled}" /> |
| 75 | + <TextBlock Text="{Binding Unit}" Style="{StaticResource MutedText}" VerticalAlignment="Center" /> |
| 76 | + </StackPanel> |
| 77 | + </Grid> |
| 78 | + </Border> |
| 79 | + </DataTemplate> |
| 80 | + </ItemsControl.ItemTemplate> |
| 81 | + </ItemsControl> |
| 82 | + </ScrollViewer> |
| 83 | + </Border> |
| 84 | + |
| 85 | + <!-- Status + apply --> |
| 86 | + <Grid Grid.Row="2" Margin="0,12,0,0"> |
| 87 | + <Grid.ColumnDefinitions> |
| 88 | + <ColumnDefinition Width="*" /> |
| 89 | + <ColumnDefinition Width="Auto" /> |
| 90 | + </Grid.ColumnDefinitions> |
| 91 | + <TextBlock Grid.Column="0" Text="{Binding StatusMessage}" Style="{StaticResource MutedText}" |
| 92 | + VerticalAlignment="Center" TextWrapping="Wrap" Margin="0,0,12,0" /> |
| 93 | + <Button Grid.Column="1" Content="⚙ Apply to Engine.ini" Click="OnApply" Padding="18,8" FontWeight="SemiBold" /> |
| 94 | + </Grid> |
| 95 | + </Grid> |
| 96 | +</UserControl> |
0 commit comments