Mesen2/UI/Views/PceConfigView.axaml

125 lines
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:c="using:Mesen.Controls"
xmlns:dc="using:Mesen.Debugger.Controls"
xmlns:cfg="using:Mesen.Config"
xmlns:v="using:Mesen.Views"
xmlns:l="using:Mesen.Localization"
mc:Ignorable="d" d:DesignWidth="450" d:DesignHeight="350"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch"
x:DataType="vm:PceConfigViewModel"
x:Class="Mesen.Views.PceConfigView"
>
<Design.DataContext>
<vm:PceConfigViewModel />
</Design.DataContext>
<TabControl TabStripPlacement="Top" SelectedIndex="{Binding SelectedTab}">
<TabItem Header="{l:Translate tpgGeneral}">
<ScrollViewer AllowAutoHide="False" HorizontalScrollBarVisibility="Auto" Padding="0 0 2 0">
<StackPanel>
<Grid ColumnDefinitions="Auto,Auto" RowDefinitions="Auto,Auto">
<TextBlock Text="{l:Translate lblConsoleType}"/>
<c:EnumComboBox SelectedItem="{Binding Config.ConsoleType}" Grid.Column="1" MinWidth="200" />
<TextBlock Text="{l:Translate lblCdRomType}" Grid.Row="1" />
<c:EnumComboBox SelectedItem="{Binding Config.CdRomType}" Grid.Row="1" Grid.Column="1" />
</Grid>
</StackPanel>
</ScrollViewer>
</TabItem>
<TabItem Header="{l:Translate tpgAudio}">
<ScrollViewer AllowAutoHide="False" HorizontalScrollBarVisibility="Auto" Padding="0 0 2 0">
<StackPanel>
<c:GroupBox Header="{l:Translate grpVolume}" HorizontalAlignment="Left">
<StackPanel Orientation="Horizontal" Height="150">
<StackPanel.Styles>
<Style Selector="c|MesenSlider">
<Setter Property="Minimum" Value="0" />
<Setter Property="Maximum" Value="100" />
<Setter Property="Orientation" Value="Vertical" />
<Setter Property="Margin" Value="5 0" />
</Style>
</StackPanel.Styles>
<c:MesenSlider Text="{l:Translate lblChannel1}" Value="{Binding Config.Channel1Vol}" />
<c:MesenSlider Text="{l:Translate lblChannel2}" Value="{Binding Config.Channel2Vol}" />
<c:MesenSlider Text="{l:Translate lblChannel3}" Value="{Binding Config.Channel3Vol}" />
<c:MesenSlider Text="{l:Translate lblChannel4}" Value="{Binding Config.Channel4Vol}" />
<c:MesenSlider Text="{l:Translate lblChannel5}" Value="{Binding Config.Channel5Vol}" />
<c:MesenSlider Text="{l:Translate lblChannel6}" Value="{Binding Config.Channel6Vol}" />
<c:MesenSlider Text="{l:Translate lblCdAudio}" Value="{Binding Config.CdAudioVolume}" />
<c:MesenSlider Text="{l:Translate lblAdpcm}" Value="{Binding Config.AdpcmVolume}" />
</StackPanel>
</c:GroupBox>
<c:OptionSection Header="{l:Translate tpgGeneral}">
<StackPanel>
<CheckBox IsChecked="{Binding Config.UseHuC6280aAudio}" Content="{l:Translate chkUseHuC6280aAudio}" />
</StackPanel>
</c:OptionSection>
</StackPanel>
</ScrollViewer>
</TabItem>
<TabItem Header="{l:Translate tpgEmulation}">
<ScrollViewer AllowAutoHide="False" HorizontalScrollBarVisibility="Auto" Padding="0 0 2 0">
<StackPanel>
<c:OptionSection Header="{l:Translate lblDeveloperSettings}" Margin="0">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{l:Translate lblRamPowerOnState}" />
<c:EnumComboBox SelectedItem="{Binding Config.RamPowerOnState}" Width="200" />
</StackPanel>
<c:CheckBoxWarning IsChecked="{Binding Config.EnableRandomPowerOnState}" Text="{l:Translate chkRandomPowerOnState}" />
</c:OptionSection>
<c:OptionSection Header="{l:Translate lblMiscSettings}">
<c:CheckBoxWarning IsChecked="{Binding Config.EnableCdRomForHuCardGames}" Text="{l:Translate chkEnableCdRomForHuCardGames}" />
<c:CheckBoxWarning IsChecked="{Binding Config.DisableCdRomSaveRamForHuCardGames}" Text="{l:Translate chkDisableCdRomSaveRamForHuCardGames}" IsVisible="{Binding !Config.EnableCdRomForHuCardGames}" />
<c:CheckBoxWarning IsChecked="False" Text="{l:Translate chkDisableCdRomSaveRamForHuCardGames}" IsEnabled="False" IsVisible="{Binding Config.EnableCdRomForHuCardGames}" />
</c:OptionSection>
</StackPanel>
</ScrollViewer>
</TabItem>
<TabItem Header="{l:Translate tpgInput}">
<v:PceInputConfigView DataContext="{Binding Input}" />
</TabItem>
<TabItem Header="{l:Translate tpgVideo}">
<ScrollViewer AllowAutoHide="False" HorizontalScrollBarVisibility="Auto" Padding="0 0 2 0">
<StackPanel>
<v:VideoConfigOverrideView DataContext="{Binding Config.ConfigOverrides}" />
<c:OptionSection Header="{l:Translate lblMiscSettings}">
<CheckBox IsChecked="{Binding Config.RemoveSpriteLimit}" Content="{l:Translate chkRemoveSpriteLimit}" />
<c:CheckBoxWarning IsChecked="{Binding Config.ForceFixedResolution}" Text="{l:Translate chkForceFixedResolution}" />
<c:CheckBoxWarning IsChecked="{Binding Config.DisableFrameSkipping}" Text="{l:Translate chkDisableFrameSkipping}" />
<c:CheckBoxWarning IsChecked="{Binding Config.DisableBackground}" Text="{l:Translate chkDisableBackground}" />
<c:CheckBoxWarning IsChecked="{Binding Config.DisableSprites}" Text="{l:Translate chkDisableSprites}" />
<c:CheckBoxWarning IsChecked="{Binding Config.DisableBackgroundVdc2}" Text="{l:Translate chkDisableBackgroundVdc2}" />
<c:CheckBoxWarning IsChecked="{Binding Config.DisableSpritesVdc2}" Text="{l:Translate chkDisableSpritesVdc2}" />
</c:OptionSection>
<c:OptionSection Header="{l:Translate lblPalette}">
<c:PaletteConfig
Palette="{Binding Config.Palette}"
PalettePresets="{Binding PalettePresets}"
ColumnCount="32"
BlockSize="12"
SmallPaletteSize="512"
LargePaletteSize="512"
/>
</c:OptionSection>
<c:OptionSection Header="{l:Translate lblOverscan}">
<c:OverscanInput Overscan="{Binding Config.Overscan}" />
</c:OptionSection>
</StackPanel>
</ScrollViewer>
</TabItem>
</TabControl>
</UserControl>