Mesen2/UI/Views/PceInputConfigView.axaml

95 lines
3.6 KiB
XML

<UserControl
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="using:Mesen.ViewModels"
xmlns:l="using:Mesen.Localization"
xmlns:c="using:Mesen.Controls"
xmlns:v="using:Mesen.Views"
xmlns:cfg="using:Mesen.Config"
mc:Ignorable="d" d:DesignWidth="500" d:DesignHeight="450"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch"
x:DataType="vm:PceInputConfigViewModel"
x:Class="Mesen.Views.PceInputConfigView"
>
<Design.DataContext>
<vm:PceInputConfigViewModel />
</Design.DataContext>
<ScrollViewer AllowAutoHide="False" HorizontalScrollBarVisibility="Auto" Padding="0 0 2 0">
<StackPanel>
<c:OptionSection Header="{l:Translate grpControllers}" Margin="0">
<Grid ColumnDefinitions="Auto,*,Auto" RowDefinitions="Auto,Auto,Auto,Auto,Auto" HorizontalAlignment="Left">
<TextBlock Grid.Row="0" Grid.Column="0" Text="{l:Translate lblController}" />
<c:InputComboBox
Grid.Row="0" Grid.Column="1"
Config="{Binding Config.Port1}"
ControllerType="{Binding Config.Port1.Type}"
AvailableValues="{Binding AvailableControllerTypesP1}"
/>
<c:GroupBox
Header="{l:Translate lblTurboTapConfig}"
IsVisible="{Binding HasTurboTap}"
HorizontalAlignment="Right"
Margin="0 5 -6 5"
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="3"
>
<Grid ColumnDefinitions="Auto,*,Auto" RowDefinitions="Auto,Auto,Auto,Auto,Auto">
<TextBlock Grid.Row="0" Grid.Column="0" Text="{l:Translate lblPort1A}" />
<c:InputComboBox
Grid.Row="0" Grid.Column="1"
Config="{Binding Config.Port1}"
ControllerType="{Binding Config.Port1A.Type}"
AvailableValues="{Binding AvailableControllerTypesTurboTap}"
/>
<TextBlock Grid.Row="1" Grid.Column="0" Text="{l:Translate lblPort1B}" />
<c:InputComboBox
Grid.Row="1" Grid.Column="1"
Config="{Binding Config.Port1B}"
ControllerType="{Binding Config.Port1B.Type}"
AvailableValues="{Binding AvailableControllerTypesTurboTap}"
/>
<TextBlock Grid.Row="2" Grid.Column="0" Text="{l:Translate lblPort1C}" />
<c:InputComboBox
Grid.Row="2" Grid.Column="1"
Config="{Binding Config.Port1C}"
ControllerType="{Binding Config.Port1C.Type}"
AvailableValues="{Binding AvailableControllerTypesTurboTap}"
/>
<TextBlock Grid.Row="3" Grid.Column="0" Text="{l:Translate lblPort1D}" />
<c:InputComboBox
Grid.Row="3" Grid.Column="1"
Config="{Binding Config.Port1D}"
ControllerType="{Binding Config.Port1D.Type}"
AvailableValues="{Binding AvailableControllerTypesTurboTap}"
/>
<TextBlock Grid.Row="4" Grid.Column="0" Text="{l:Translate lblPort1E}" />
<c:InputComboBox
Grid.Row="4" Grid.Column="1"
Config="{Binding Config.Port1E}"
ControllerType="{Binding Config.Port1E.Type}"
AvailableValues="{Binding AvailableControllerTypesTurboTap}"
/>
</Grid>
</c:GroupBox>
</Grid>
</c:OptionSection>
<c:OptionSection Header="{l:Translate grpGeneral}">
<StackPanel>
<CheckBox IsChecked="{Binding Config.PreventSelectRunReset}" Content="{l:Translate chkPreventSelectRunReset}" />
<c:CheckBoxWarning IsChecked="{Binding Config.AllowInvalidInput}" Text="{l:Translate chkAllowInvalidInput}" />
</StackPanel>
</c:OptionSection>
</StackPanel>
</ScrollViewer>
</UserControl>