mirror of
https://github.com/SourMesen/Mesen2.git
synced 2025-04-02 10:21:44 -04:00
63 lines
No EOL
2.3 KiB
XML
63 lines
No EOL
2.3 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:l="using:Mesen.Localization"
|
|
xmlns:c="using:Mesen.Controls"
|
|
xmlns:dc="using:Mesen.Debugger.Controls"
|
|
mc:Ignorable="d" d:DesignWidth="450" d:DesignHeight="400"
|
|
x:Name="root"
|
|
x:Class="Mesen.Controls.PaletteConfig"
|
|
>
|
|
<StackPanel HorizontalAlignment="Left">
|
|
<Border BorderBrush="#555" BorderThickness="1">
|
|
<ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Auto" Height="96" AllowAutoHide="False">
|
|
<dc:PaletteSelector
|
|
PaletteColors="{Binding Palette, ElementName=root}"
|
|
SelectionMode="None"
|
|
ColumnCount="{Binding ColumnCount, ElementName=root}"
|
|
BlockSize="{Binding BlockSize, ElementName=root}"
|
|
ColorClick="PaletteColor_OnClick"
|
|
ShowIndexes="{Binding ShowIndexes, ElementName=root}"
|
|
/>
|
|
</ScrollViewer>
|
|
</Border>
|
|
|
|
<Grid ColumnDefinitions="*,*,*" RowDefinitions="Auto">
|
|
<Button
|
|
Grid.Column="0"
|
|
HorizontalAlignment="Stretch"
|
|
HorizontalContentAlignment="Center"
|
|
Content="{l:Translate btnSelectPalette}"
|
|
Click="btnSelectPalette_OnClick"
|
|
>
|
|
<Button.ContextMenu>
|
|
<ContextMenu Name="Preset" Placement="BottomEdgeAlignedLeft" ItemsSource="{Binding PalettePresets, ElementName=root}">
|
|
<ContextMenu.Styles>
|
|
<Style Selector="MenuItem">
|
|
<Setter Property="Header" Value="{Binding Name, DataType={x:Type c:PalettePreset}}" />
|
|
<Setter Property="Command" Value="{Binding $parent[c:PaletteConfig].SelectPreset, DataType={x:Type c:PaletteConfig}}" />
|
|
<Setter Property="CommandParameter" Value="{Binding Palette, DataType={x:Type c:PalettePreset}}" />
|
|
</Style>
|
|
</ContextMenu.Styles>
|
|
</ContextMenu>
|
|
</Button.ContextMenu>
|
|
</Button>
|
|
<Button
|
|
Grid.Column="1"
|
|
HorizontalAlignment="Stretch"
|
|
HorizontalContentAlignment="Center"
|
|
Content="{l:Translate btnLoadPalFile}"
|
|
Click="btnLoadPalFile_OnClick"
|
|
/>
|
|
<Button
|
|
Grid.Column="2"
|
|
HorizontalAlignment="Stretch"
|
|
HorizontalContentAlignment="Center"
|
|
Content="{l:Translate btnExportPalette}"
|
|
Click="btnExportPalette_OnClick"
|
|
/>
|
|
</Grid>
|
|
</StackPanel>
|
|
</UserControl> |