165 lines
12 KiB
XML
165 lines
12 KiB
XML
<Window x:Class="BallanceTasEditor.Views.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
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:local="clr-namespace:BallanceTasEditor.Views"
|
|
xmlns:styles="clr-namespace:BallanceTasEditor.Styles"
|
|
mc:Ignorable="d" WindowStartupLocation="CenterScreen"
|
|
Title="Ballance TAS Editor" Height="600" Width="800" Icon="/Assets/App.ico">
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto"/>
|
|
<RowDefinition Height="auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Menu Grid.Row="0">
|
|
<Menu.Resources>
|
|
<!-- Menu Icons -->
|
|
<Image x:Key="IconNewFile" Source="/Assets/NewFile.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconOpenFile" Source="/Assets/OpenFile.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconSaveFile" Source="/Assets/SaveFile.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconSaveFileAs" Source="/Assets/SaveFileAs.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconSaveFileThenRunGame" Source="/Assets/SaveFileThenRunGame.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconCloseFile" Source="/Assets/CloseFile.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconExit" Source="/Assets/Exit.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconUndo" Source="/Assets/Undo.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconRedo" Source="/Assets/Redo.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconNextItem" Source="/Assets/NextItem.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconNextPage" Source="/Assets/NextPage.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconPreviousItem" Source="/Assets/PreviousItem.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconPreviousPage" Source="/Assets/PreviousPage.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconGoto" Source="/Assets/Goto.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconDrawMode" Source="/Assets/DrawMode.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconFillMode" Source="/Assets/FillMode.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconSelectMode" Source="/Assets/SelectMode.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconClearKeys" Source="/Assets/ClearKeys.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconUniformFps" Source="/Assets/SetFps.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconPreference" Source="/Assets/Preference.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconReportBug" Source="/Assets/ReportBug.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconAbout" Source="/Assets/About.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
</Menu.Resources>
|
|
|
|
<MenuItem Header="_File" Padding="5">
|
|
<MenuItem Header="_New File" Icon="{StaticResource IconNewFile}" InputGestureText="Ctrl+N" Click="MenuItem_Click_3"/>
|
|
<MenuItem Header="_Open File" Icon="{StaticResource IconOpenFile}" InputGestureText="Ctrl+O"/>
|
|
<Separator/>
|
|
<MenuItem Header="_Save File" Icon="{StaticResource IconSaveFile}" InputGestureText="Ctrl+S"/>
|
|
<MenuItem Header="Save File As ..." Icon="{StaticResource IconSaveFileAs}"/>
|
|
<MenuItem Header="Save File then _Run Game" Icon="{StaticResource IconSaveFileThenRunGame}" InputGestureText="B"/>
|
|
<Separator/>
|
|
<MenuItem Header="Close File" Icon="{StaticResource IconCloseFile}"/>
|
|
<MenuItem Header="Exit" Icon="{StaticResource IconExit}"/>
|
|
</MenuItem>
|
|
<MenuItem Header="_Edit" Padding="5">
|
|
<MenuItem Header="_Undo" Icon="{StaticResource IconUndo}" InputGestureText="Ctrl+Z"/>
|
|
<MenuItem Header="_Redo" Icon="{StaticResource IconRedo}" InputGestureText="Ctrl+Y"/>
|
|
<Separator/>
|
|
<MenuItem Header="Previous Page" Icon="{StaticResource IconPreviousPage}" InputGestureText="A"/>
|
|
<MenuItem Header="Previous Item" Icon="{StaticResource IconPreviousItem}" InputGestureText="S"/>
|
|
<MenuItem Header="Next Page" Icon="{StaticResource IconNextPage}" InputGestureText="D"/>
|
|
<MenuItem Header="Next Item" Icon="{StaticResource IconNextItem}" InputGestureText="F"/>
|
|
<MenuItem Header="Goto Item" Icon="{StaticResource IconGoto}" InputGestureText="G" Click="MenuItem_Click_4"/>
|
|
<Separator/>
|
|
<MenuItem Header="Select Mode" Icon="{StaticResource IconSelectMode}"/>
|
|
<MenuItem Header="Fill Mode" Icon="{StaticResource IconFillMode}"/>
|
|
<MenuItem Header="Draw Mode" Icon="{StaticResource IconDrawMode}"/>
|
|
<Separator/>
|
|
<MenuItem Header="Clear Keys" Icon="{StaticResource IconClearKeys}"/>
|
|
<MenuItem Header="Uniform FPS" Icon="{StaticResource IconUniformFps}" Click="MenuItem_Click_5"/>
|
|
<Separator/>
|
|
<MenuItem Header="Preference" Icon="{StaticResource IconPreference}" InputGestureText="Ctrl+P" Click="MenuItem_Click"/>
|
|
</MenuItem>
|
|
<MenuItem Header="_Help" Padding="5">
|
|
<MenuItem Header="Report Bug" Icon="{StaticResource IconReportBug}"/>
|
|
<MenuItem Header="About" Icon="{StaticResource IconAbout}" Click="MenuItem_Click_1"/>
|
|
</MenuItem>
|
|
</Menu>
|
|
|
|
<Grid Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<StackPanel Orientation="Horizontal" Grid.Column="0">
|
|
<Button Content="Select Mode" Margin="5" Padding="5"
|
|
Style="{StaticResource AccessoryIconButton}" styles:AccessoryIcon.Icon="/Assets/SelectMode.ico"/>
|
|
<Button Content="Fill Mode" Margin="5" Padding="5"
|
|
Style="{StaticResource AccessoryIconButton}" styles:AccessoryIcon.Icon="/Assets/FillMode.ico"/>
|
|
<Button Content="Draw Mode" Margin="5" Padding="5"
|
|
Style="{StaticResource AccessoryIconButton}" styles:AccessoryIcon.Icon="/Assets/DrawMode.ico"/>
|
|
</StackPanel>
|
|
|
|
<Button Content="Save File then Run Game" Grid.Column="1" Margin="5" Padding="5"
|
|
Style="{StaticResource AccessoryIconButton}" styles:AccessoryIcon.Icon="/Assets/SaveFileThenRunGame.ico"/>
|
|
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="2">
|
|
<Grid VerticalAlignment="Center" HorizontalAlignment="Center" AllowDrop="True">
|
|
<Rectangle StrokeThickness="4" Stroke="Gray" StrokeDashArray="4 4" Fill="Transparent"/>
|
|
<StackPanel Orientation="Horizontal" Margin="20">
|
|
<Image Source="/Assets/OpenFile.ico" Width="24" Height="24" Margin="5" VerticalAlignment="Center"/>
|
|
<TextBlock Margin="5" Text="Open or Drop a TAS File for Editing" Foreground="Gray" FontSize="16" VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<local:TasViewer>
|
|
<local:TasViewer.ContextMenu>
|
|
<ContextMenu>
|
|
<ContextMenu.Resources>
|
|
<!-- Context Menu Icons -->
|
|
<Image x:Key="IconSet" Source="/Assets/SetCell.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconUnset" Source="/Assets/UnsetCell.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconFlip" Source="/Assets/FlipCell.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconCut" Source="/Assets/CutFrame.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconCopy" Source="/Assets/CopyFrame.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconPaste" Source="/Assets/PasteFrame.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconDelete" Source="/Assets/DeleteFrame.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconAdd" Source="/Assets/AddFrame.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
<Image x:Key="IconFps" Source="/Assets/SetFps.ico" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
</ContextMenu.Resources>
|
|
|
|
<MenuItem Header="Set" Icon="{StaticResource IconSet}"/>
|
|
<MenuItem Header="Unset" Icon="{StaticResource IconUnset}"/>
|
|
<MenuItem Header="Flip" Icon="{StaticResource IconFlip}"/>
|
|
<Separator/>
|
|
<MenuItem Header="Cut" Icon="{StaticResource IconCut}" InputGestureText="Ctrl+X"/>
|
|
<MenuItem Header="Copy" Icon="{StaticResource IconCopy}" InputGestureText="Ctrl+C"/>
|
|
<MenuItem Header="Paste after This" Icon="{StaticResource IconPaste}" InputGestureText="Ctrl+V"/>
|
|
<MenuItem Header="Paste before This"/>
|
|
<Separator/>
|
|
<MenuItem Header="Delete This" Icon="{StaticResource IconDelete}"/>
|
|
<MenuItem Header="Delete after This" InputGestureText="Del"/>
|
|
<MenuItem Header="Delete before This" InputGestureText="Backspace"/>
|
|
<Separator/>
|
|
<MenuItem Header="Add after This" Icon="{StaticResource IconAdd}" Click="MenuItem_Click_2"/>
|
|
<MenuItem Header="Add before This"/>
|
|
<Separator/>
|
|
<MenuItem Header="Set FPS" Icon="{StaticResource IconFps}" Click="MenuItem_Click_6"/>
|
|
</ContextMenu>
|
|
</local:TasViewer.ContextMenu>
|
|
</local:TasViewer>
|
|
</Grid>
|
|
|
|
<StatusBar Grid.Row="3">
|
|
<!-- 这玩意要逆序排列才能达到我想要的需求也是奇葩 -->
|
|
<StatusBarItem Content="v1.2 stable" DockPanel.Dock="Right" Foreground="Gray" FontStyle="Italic"/>
|
|
<Separator DockPanel.Dock="Right"/>
|
|
<StatusBarItem Content="$PasteMode" DockPanel.Dock="Right"/>
|
|
<Separator DockPanel.Dock="Right"/>
|
|
<StatusBarItem Content="$Selection" DockPanel.Dock="Right"/>
|
|
<Separator DockPanel.Dock="Right"/>
|
|
<StatusBarItem Content="$ToolMode" DockPanel.Dock="Right"/>
|
|
<Separator DockPanel.Dock="Right"/>
|
|
|
|
<StatusBarItem Content="$Status" HorizontalAlignment="Stretch"/>
|
|
</StatusBar>
|
|
|
|
</Grid>
|
|
</Window>
|