mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-04-26 02:29:59 -05:00
PKMEditor: - Form Argument control (IFormArgument, conditional NumericUpDown) - Alpha Mastered Move selector (PA8/Legends Arceus) - Move Shop editor button (IMoveShop8Mastery) - Tech Records editor button (ITechRecord) - Nickname font warning button SAV Editor: - Box search bar with species name filtering and slot dimming - Extra slots display in Other tab (Daycare, Fused, Ride, etc.) - Save slot info display (type, generation, checksum status) - Slot search opacity and highlight model support
211 lines
12 KiB
XML
211 lines
12 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="using:PKHeX.Avalonia.ViewModels"
|
|
xmlns:views="using:PKHeX.Avalonia.Views"
|
|
x:Class="PKHeX.Avalonia.Views.SAVEditorView"
|
|
x:DataType="vm:SAVEditorViewModel">
|
|
|
|
<TabControl Classes="sav-tabs" Padding="0" Margin="2">
|
|
<!-- Box Tab -->
|
|
<TabItem Header="Box">
|
|
<DockPanel Margin="2">
|
|
<!-- Search bar -->
|
|
<Grid DockPanel.Dock="Top" ColumnDefinitions="*,Auto" Margin="0,2,0,2"
|
|
IsVisible="{Binding IsLoaded}">
|
|
<TextBox Text="{Binding SearchText}" Watermark="Search species..." Height="24" FontSize="11" Margin="0,0,4,0" />
|
|
<TextBlock Grid.Column="1" Text="{Binding SearchResultText}" FontSize="10" VerticalAlignment="Center" Opacity="0.7" />
|
|
</Grid>
|
|
|
|
<!-- Box Navigation: [<<] ComboBox [>>] -->
|
|
<Grid DockPanel.Dock="Top" ColumnDefinitions="30,*,30" Margin="0,2,0,4">
|
|
<Button Grid.Column="0" Content="<<" Command="{Binding PreviousBoxCommand}"
|
|
Width="30" Height="24" HorizontalContentAlignment="Center"
|
|
FontSize="11" Padding="0" />
|
|
<ComboBox Grid.Column="1"
|
|
ItemsSource="{Binding BoxNames}"
|
|
SelectedIndex="{Binding CurrentBox}"
|
|
HorizontalAlignment="Stretch"
|
|
Height="24" FontSize="11" Padding="4,2"
|
|
Margin="2,0" />
|
|
<Button Grid.Column="2" Content=">>" Command="{Binding NextBoxCommand}"
|
|
Width="30" Height="24" HorizontalContentAlignment="Center"
|
|
FontSize="11" Padding="0" />
|
|
</Grid>
|
|
|
|
<!-- Box Grid: 6 columns x 5 rows = 30 slots, with wallpaper background -->
|
|
<Border CornerRadius="4" ClipToBounds="True"
|
|
Width="420" HorizontalAlignment="Center">
|
|
<Border.ContextMenu>
|
|
<ContextMenu>
|
|
<MenuItem Header="Sort">
|
|
<MenuItem Header="Sort Current Box (Species)" Command="{Binding SortBoxBySpeciesCommand}" />
|
|
<MenuItem Header="Sort Current Box (Level)" Command="{Binding SortBoxByLevelCommand}" />
|
|
<MenuItem Header="Sort All Boxes" Command="{Binding SortAllBoxesCommand}" />
|
|
</MenuItem>
|
|
<MenuItem Header="Clear">
|
|
<MenuItem Header="Clear Current Box" Command="{Binding ClearBoxCommand}" />
|
|
<MenuItem Header="Clear All Boxes" Command="{Binding ClearAllBoxesCommand}" />
|
|
</MenuItem>
|
|
</ContextMenu>
|
|
</Border.ContextMenu>
|
|
<Panel>
|
|
<!-- Wallpaper background layer -->
|
|
<Image Source="{Binding BoxWallpaper}"
|
|
Stretch="Fill"
|
|
IsHitTestVisible="False" />
|
|
<!-- Slot grid layer -->
|
|
<ItemsControl ItemsSource="{Binding BoxSlots}"
|
|
Width="420" HorizontalAlignment="Center">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<UniformGrid Columns="6" Rows="5" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<views:SlotControl />
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</Panel>
|
|
</Border>
|
|
</DockPanel>
|
|
</TabItem>
|
|
|
|
<!-- Party Tab -->
|
|
<TabItem Header="Party">
|
|
<StackPanel Margin="2,4">
|
|
<TextBlock Text="Party" FontWeight="SemiBold" FontSize="11" Margin="0,0,0,4" />
|
|
<ItemsControl ItemsSource="{Binding PartySlots}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<UniformGrid Columns="6" Rows="1" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<views:SlotControl />
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</StackPanel>
|
|
</TabItem>
|
|
|
|
<!-- Other Tab -->
|
|
<TabItem Header="Other">
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
|
<StackPanel Margin="4" Spacing="4">
|
|
<!-- Daycare -->
|
|
<TextBlock Text="Daycare" FontWeight="SemiBold" FontSize="11" IsVisible="{Binding HasDaycare}" />
|
|
<TextBlock Text="{Binding DaycareInfo}" FontSize="11" FontFamily="Consolas,monospace"
|
|
IsVisible="{Binding HasDaycare}" />
|
|
|
|
<!-- Extra Slots (Fused, GTS, Battle Box, etc.) -->
|
|
<Border Height="1" Background="#CCCCCC" Margin="0,4" IsVisible="{Binding HasExtraSlots}" />
|
|
<TextBlock Text="Extra Slots" FontWeight="SemiBold" FontSize="11" IsVisible="{Binding HasExtraSlots}" />
|
|
<ItemsControl ItemsSource="{Binding ExtraSlots}" IsVisible="{Binding HasExtraSlots}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border Margin="0,1" Padding="2" CornerRadius="2"
|
|
Background="#08000000">
|
|
<StackPanel Orientation="Horizontal" Spacing="6">
|
|
<Image Source="{Binding Image}" Width="40" Height="30"
|
|
RenderOptions.BitmapInterpolationMode="None"
|
|
VerticalAlignment="Center" />
|
|
<StackPanel VerticalAlignment="Center" Spacing="0">
|
|
<TextBlock Text="{Binding SlotLabel}" FontSize="10" FontWeight="SemiBold" />
|
|
<TextBlock Text="{Binding Summary}" FontSize="10" Opacity="0.7" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
|
|
<!-- Save Slot Info -->
|
|
<Border Height="1" Background="#CCCCCC" Margin="0,4" IsVisible="{Binding HasSaveSlotInfo}" />
|
|
<TextBlock Text="Save Info" FontWeight="SemiBold" FontSize="11" IsVisible="{Binding HasSaveSlotInfo}" />
|
|
<TextBlock Text="{Binding SaveSlotInfo}" FontSize="10" FontFamily="Consolas,monospace"
|
|
IsVisible="{Binding HasSaveSlotInfo}" />
|
|
|
|
<!-- Fallback -->
|
|
<TextBlock Text="No additional slots available for this save type."
|
|
FontSize="11" Opacity="0.6"
|
|
IsVisible="{Binding !IsLoaded}" />
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</TabItem>
|
|
|
|
<!-- SAV Tab (tool buttons) -->
|
|
<TabItem Header="SAV">
|
|
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
|
<StackPanel Margin="4">
|
|
<!-- Dynamic save-type-specific tools -->
|
|
<ItemsControl ItemsSource="{Binding SavTools}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<WrapPanel Orientation="Horizontal" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Button Content="{Binding Name}"
|
|
Command="{Binding $parent[ItemsControl].DataContext.OpenToolCommand}"
|
|
CommandParameter="{Binding}"
|
|
Margin="2" Padding="10,4" FontSize="11" />
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
|
|
<!-- Separator -->
|
|
<Border Height="1" Background="#CCCCCC" Margin="0,4" IsVisible="{Binding IsLoaded}" />
|
|
|
|
<!-- Global tools (always available when save loaded) -->
|
|
<WrapPanel Orientation="Horizontal" IsVisible="{Binding IsLoaded}">
|
|
<Button Content="Database" Command="{Binding OpenDatabaseCommand}"
|
|
Margin="2" Padding="10,4" FontSize="11" />
|
|
<Button Content="Encounters" Command="{Binding OpenEncountersCommand}"
|
|
Margin="2" Padding="10,4" FontSize="11" />
|
|
<Button Content="Batch Editor" Command="{Binding OpenBatchEditorCommand}"
|
|
Margin="2" Padding="10,4" FontSize="11" />
|
|
<Button Content="Report Grid" Command="{Binding OpenReportGridCommand}"
|
|
Margin="2" Padding="10,4" FontSize="11" />
|
|
<Button Content="Box Viewer" Command="{Binding OpenBoxViewerCommand}"
|
|
Margin="2" Padding="10,4" FontSize="11" />
|
|
<Button Content="Mystery Gift DB" Command="{Binding OpenMysteryGiftDBCommand}"
|
|
Margin="2" Padding="10,4" FontSize="11" />
|
|
<Button Content="Ribbon Editor" Command="{Binding OpenRibbonEditorCommand}"
|
|
Margin="2" Padding="10,4" FontSize="11" />
|
|
<Button Content="Memory / Amie" Command="{Binding OpenMemoryAmieCommand}"
|
|
Margin="2" Padding="10,4" FontSize="11" />
|
|
<Button Content="Tech Records" Command="{Binding OpenTechRecordEditorCommand}"
|
|
Margin="2" Padding="10,4" FontSize="11" />
|
|
</WrapPanel>
|
|
|
|
<!-- Utility buttons -->
|
|
<WrapPanel Orientation="Horizontal" IsVisible="{Binding IsLoaded}" Margin="0,4,0,0">
|
|
<Button Content="Verify Checksums" Command="{Binding VerifyChecksumsCommand}"
|
|
Margin="2" Padding="10,4" FontSize="11" />
|
|
<Button Content="Verify All PKM" Command="{Binding VerifyAllPkmCommand}"
|
|
Margin="2" Padding="10,4" FontSize="11" />
|
|
<Button Content="Export Backup" Command="{Binding ExportBackupCommand}"
|
|
Margin="2" Padding="10,4" FontSize="11" />
|
|
</WrapPanel>
|
|
|
|
<!-- Settings (always available) -->
|
|
<WrapPanel Orientation="Horizontal" Margin="0,4,0,0">
|
|
<Button Content="Settings" Command="{Binding OpenSettingsEditorCommand}"
|
|
Margin="2" Padding="10,4" FontSize="11" />
|
|
</WrapPanel>
|
|
|
|
<TextBlock Text="Load a save file to access tools."
|
|
FontSize="11" Opacity="0.6" Margin="4,6,0,0"
|
|
TextWrapping="Wrap"
|
|
IsVisible="{Binding !IsLoaded}" />
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</TabItem>
|
|
</TabControl>
|
|
|
|
</UserControl>
|