mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
151 lines
8.5 KiB
XML
151 lines
8.5 KiB
XML
<controls:MetroWindow x:Class="Artemis.Views.LayerEditorView"
|
|
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:controls="http://metro.mahapps.com/winfx/xaml/controls"
|
|
xmlns:cal="http://www.caliburnproject.org"
|
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
|
xmlns:utilities="clr-namespace:Artemis.Utilities"
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
|
mc:Ignorable="d"
|
|
Title="Artemis | Edit Layer" Height="750" Width="630"
|
|
xmlns:profileEnumerations="clr-namespace:Artemis.Models.Profiles"
|
|
xmlns:ncore="http://schemas.ncore.com/wpf/xaml/colorbox"
|
|
GlowBrush="{DynamicResource AccentColorBrush}" Icon="../logo.ico" ResizeMode="NoResize">
|
|
<controls:MetroWindow.Resources>
|
|
<utilities:EnumDescriptionConverter x:Key="HEnumDescriptionConverter" />
|
|
<ObjectDataProvider MethodName="GetValues"
|
|
ObjectType="{x:Type sys:Enum}"
|
|
x:Key="AnimationEnumValues">
|
|
<ObjectDataProvider.MethodParameters>
|
|
<x:Type TypeName="profileEnumerations:LayerAnimation" />
|
|
</ObjectDataProvider.MethodParameters>
|
|
</ObjectDataProvider>
|
|
</controls:MetroWindow.Resources>
|
|
|
|
<Grid Margin="10,0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="65*" />
|
|
<ColumnDefinition Width="86*" />
|
|
<ColumnDefinition Width="65*" />
|
|
<ColumnDefinition Width="86*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Header -->
|
|
<Label Grid.Row="0" Grid.ColumnSpan="4" FontSize="20" Content="Basics" />
|
|
|
|
<!-- Layer name -->
|
|
<TextBlock Grid.Row="1" Grid.Column="0" Margin="10,12" FontSize="13.333" Text="Name:"
|
|
VerticalAlignment="Center" Height="18" />
|
|
<TextBox Grid.Row="1" Grid.Column="1" x:Name="Name" Margin="10" Text="{Binding Path=Layer.Name}" />
|
|
|
|
<!-- Layer type -->
|
|
|
|
<!-- Condition editor -->
|
|
<Label Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4" FontSize="20" Content="Display if.." />
|
|
<Border Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="4" BorderThickness="1"
|
|
BorderBrush="{StaticResource GrayBrush7}" Margin="10,0" SnapsToDevicePixels="True">
|
|
<ListBox Height="138" x:Name="LayerConditionVms" ScrollViewer.VerticalScrollBarVisibility="Visible">
|
|
<ListBox.Template>
|
|
<ControlTemplate>
|
|
<ScrollViewer>
|
|
<ItemsPresenter />
|
|
</ScrollViewer>
|
|
</ControlTemplate>
|
|
</ListBox.Template>
|
|
</ListBox>
|
|
</Border>
|
|
<Button Grid.Row="4" Grid.Column="3" x:Name="AddCondition" Content="Add condition" VerticalAlignment="Center"
|
|
Style="{DynamicResource SquareButtonStyle}" Width="95" HorizontalAlignment="Right" Height="30"
|
|
Margin="0,10,10,10" ScrollViewer.VerticalScrollBarVisibility="Auto" />
|
|
|
|
<!-- Advanced -->
|
|
<Label Grid.Row="4" Grid.Column="0" FontSize="20" HorizontalAlignment="Left"
|
|
Content="Advanced" Width="97" VerticalAlignment="Bottom" />
|
|
|
|
<!-- Height -->
|
|
<TextBlock Grid.Row="5" Grid.Column="0" Margin="10" FontSize="13.333" Text="Height:" VerticalAlignment="Center"
|
|
Height="18" />
|
|
<TextBox Grid.Row="5" Grid.Column="1" Margin="10" Text="{Binding Path=ProposedProperties.Height}" />
|
|
|
|
<!-- Width -->
|
|
<TextBlock Grid.Row="5" Grid.Column="2" Margin="10" FontSize="13.333" Text="Width:" VerticalAlignment="Center"
|
|
Height="18" />
|
|
<TextBox Grid.Row="5" Grid.Column="3" Margin="10" Text="{Binding Path=ProposedProperties.Width}" />
|
|
|
|
<!-- Colors -->
|
|
<TextBlock Grid.Row="6" Grid.Column="0" Margin="10,13,10,0" FontSize="13.333" Text="Color(s):"
|
|
VerticalAlignment="Top" Height="18" />
|
|
<Border Grid.Row="6" Grid.Column="1" Margin="10" BorderBrush="{StaticResource ControlBorderBrush}"
|
|
BorderThickness="1" SnapsToDevicePixels="True" ToolTip="Click to edit">
|
|
<ncore:ColorBox Brush="{Binding Path=ProposedProperties.Brush, Mode=TwoWay}" Height="24" />
|
|
</Border>
|
|
|
|
<!-- ContainedBrush -->
|
|
<TextBlock Grid.Row="6" Grid.Column="2" Margin="10" FontSize="13.333" Text="Contained colors:"
|
|
VerticalAlignment="Center" Height="18" />
|
|
<controls:ToggleSwitch IsChecked="{Binding Path=ProposedProperties.ContainedBrush, Mode=TwoWay}" Grid.Row="6"
|
|
Grid.Column="3" OnLabel="Yes" OffLabel="No" Margin="10,1,5,1" VerticalAlignment="Center"
|
|
Height="36" />
|
|
|
|
<!-- Animation -->
|
|
<TextBlock Grid.Row="7" Grid.Column="0" Margin="10" FontSize="13.333" Text="Animation:"
|
|
VerticalAlignment="Center"
|
|
Height="18" />
|
|
<ComboBox Grid.Row="7" Grid.Column="1" ItemsSource="{Binding Source={StaticResource AnimationEnumValues}}"
|
|
Margin="10,10,10,0" SelectedItem="{Binding Path=ProposedProperties.Animation}"
|
|
VerticalAlignment="Top" Height="22">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Converter={StaticResource HEnumDescriptionConverter}}" />
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
|
|
<!-- Animation Speed -->
|
|
<TextBlock Grid.Row="7" Grid.Column="2" Margin="10" FontSize="13.333" Text="Animation speed:"
|
|
VerticalAlignment="Center" Height="18" />
|
|
<Slider x:Name="RotationSpeed" Grid.Row="7" Grid.Column="3" VerticalAlignment="Center"
|
|
TickPlacement="None" TickFrequency="0.05"
|
|
Value="{Binding Path=ProposedProperties.AnimationSpeed, Mode=TwoWay}" Minimum="0.05" Maximum="3"
|
|
SmallChange="1" IsSnapToTickEnabled="True" Margin="10,12,10,2" Height="24" />
|
|
|
|
<!-- Opacity -->
|
|
<TextBlock Grid.Row="8" Grid.Column="0" Margin="10" FontSize="13.333" Text="Opacity:"
|
|
VerticalAlignment="Center" Height="18" />
|
|
<Slider x:Name="Sensitivity" Grid.Row="8" Grid.Column="1" VerticalAlignment="Center"
|
|
TickPlacement="BottomRight" TickFrequency="0.05"
|
|
Value="{Binding Path=ProposedProperties.Opacity, Mode=TwoWay}" Minimum="0.0" Maximum="1.0"
|
|
SmallChange="0.05" Margin="10,7" Height="24" />
|
|
|
|
<!-- Preview -->
|
|
<TextBlock Grid.Row="9" Grid.Column="0" Margin="10,13,10,0" FontSize="13.333" Text="Preview:"
|
|
VerticalAlignment="Top" Height="18" />
|
|
<Border Grid.Row="9" Grid.Column="1" Grid.ColumnSpan="2" Margin="10" BorderThickness="1"
|
|
BorderBrush="{StaticResource ControlBorderBrush}" SnapsToDevicePixels="True">
|
|
<Image Source="{Binding LayerImage}" />
|
|
</Border>
|
|
|
|
<Button Grid.Row="10" Grid.Column="0" x:Name="Apply" Content="Apply" VerticalAlignment="Bottom"
|
|
Style="{DynamicResource SquareButtonStyle}" Width="95" HorizontalAlignment="Left" Margin="10,0,0,20"
|
|
Height="30" />
|
|
<Button Grid.Row="10" Grid.Column="1" x:Name="PreSelect" Content="Reset" VerticalAlignment="Bottom"
|
|
Style="{DynamicResource SquareButtonStyle}" Width="95" HorizontalAlignment="Left" Margin="10,0,0,20"
|
|
Height="30" />
|
|
</Grid>
|
|
|
|
</controls:MetroWindow> |