Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overrides restyle #1972

Merged
merged 20 commits into from
Apr 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
4eba58f
Ported GamestateParameterPicker from defunct rewrite.
Wibble199 Apr 21, 2020
9521c2c
Removed `SetApplication` and the Application parameter from `GetContr…
Wibble199 Apr 21, 2020
62b5e20
Added ProcessPicker to the Running Process evaluatable.
Wibble199 Apr 21, 2020
ebe87be
Ported the evaluatable dragging from the UI rework
Wibble199 Apr 21, 2020
a58a299
Implemented the evaluatable spawner toolbox.
Wibble199 Apr 21, 2020
6692210
Styling changes to the evaluatable controls.
Wibble199 Apr 21, 2020
172cd7f
Added evaluatable to delay signals.
Wibble199 Apr 22, 2020
ec485e4
Added an flip-flop/SR-latch evaluatable.
Wibble199 Apr 22, 2020
53e500a
Added ability to save evaluatables (and their children) in the toolbo…
Wibble199 Apr 22, 2020
1c0b461
Improved prompt window.
Wibble199 Apr 22, 2020
6b8fc6d
Added ability to rename and remove templates.
Wibble199 Apr 22, 2020
f102766
Added icons to the toolbox to help distinguish eval types.
Wibble199 Apr 22, 2020
b6081f1
Moved the evaluatable templates onto their own tab on the toolbox.
Wibble199 Apr 23, 2020
5b4c9f9
Fixed clone issues with the If-Else evaluatable.
Wibble199 Apr 23, 2020
b51fbb8
Tidied up many of the evaluatable controls.
Wibble199 Apr 23, 2020
c22420e
Dimmed the evaluatable colors slightly.
Wibble199 Apr 23, 2020
fdae7fd
Made gradient percent layer use the new game state picker.
Wibble199 Apr 23, 2020
9e687e6
Added evaluatable toolbox to animation layer control.
Wibble199 Apr 23, 2020
f8238e7
Fixed bug with game state picker behaving strangely when there are tw…
Wibble199 Apr 23, 2020
4620234
Added folder icons to parameter picker.
Wibble199 Apr 23, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions Project-Aurora/Project-Aurora/App.xaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
<Application x:Class="Aurora.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DispatcherUnhandledException="App_DispatcherUnhandledException"
>
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:System;assembly=mscorlib"
DispatcherUnhandledException="App_DispatcherUnhandledException">

<Application.Resources>
<!--<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary>
<!--<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Themes/MetroDark/MetroDark.MSControls.Core.Implicit.xaml"/>
<ResourceDictionary Source="Themes/MetroDark/MetroDark.MSControls.Toolkit.Implicit.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>-->
</ResourceDictionary.MergedDictionaries>-->

<!-- Dictionary containing the colors of the evalutable presenters for each type of override type. -->
<ResourceDictionary x:Key="OverridesTypeColors">
<SolidColorBrush x:Key="{x:Type s:Double}" Color="#5534DB4C" />
<SolidColorBrush x:Key="{x:Type s:Boolean}" Color="#553498DB" />
<SolidColorBrush x:Key="{x:Type s:String}" Color="#55DB3453" />
</ResourceDictionary>
<SolidColorBrush x:Key="OverridesTypeFallbackColor" Color="#88DBDBDB" />
</ResourceDictionary>
</Application.Resources>

</Application>
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<UserControl x:Class="Aurora.Controls.GameStateParameterPicker"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:l="clr-namespace:Aurora.Controls" xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
mc:Ignorable="d"
xmlns:u="clr-namespace:Aurora.Utils"
Height="22" MinWidth="60">

<UserControl.Resources>
<BooleanToVisibilityConverter x:Key="BoolToVisConv" />
<DataTemplate x:Key="ListItemTemplate">
<Grid>
<TextBlock Text="{Binding DisplayPath}" Padding="4,1" Margin="0,0,16,0" />
<Image Source="/Aurora;component/Resources/icons8-folder-30.png" Width="16" Height="16" HorizontalAlignment="Right" VerticalAlignment="Center" Visibility="{Binding IsFolder, Converter={StaticResource BoolToVisConv}}" />
</Grid>
</DataTemplate>
<l:IsStringNotNullOrWhitespaceConverter x:Key="IsStringNotNullConv" />
<l:PropertyTypeToGridLengthConverter x:Key="PropTypeToHeightConv" />
</UserControl.Resources>

<Grid>
<!-- Main dropdown toggle button -->
<ToggleButton x:Name="pickerToggleButton" HorizontalContentAlignment="Left" Padding="4,1,25,1" Content="{Binding SelectedPath, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type l:GameStateParameterPicker}}}" IsChecked="{Binding IsOpen, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type l:GameStateParameterPicker}}}" />
<Path Width="10" Height="6" HorizontalAlignment="Right" Margin="0,0,9,0" Fill="#FF858585" Data="F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z " Stretch="Fill" IsHitTestVisible="False" />

<!-- Dropdown content -->
<Popup x:Name="pickerPopup" StaysOpen="False" IsOpen="{Binding IsOpen, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type l:GameStateParameterPicker}}}">
<Grid x:Name="popupContent" Background="#1A1A1A" Height="280" Width="200">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="1*" />
<RowDefinition Height="{Binding PropertyType, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type l:GameStateParameterPicker}}, Converter={StaticResource PropTypeToHeightConv}}" />
</Grid.RowDefinitions>

<!-- Up button and current "directory" -->
<StackPanel Grid.Row="0" Orientation="Vertical">
<Button Content="⬅ Previous" IsEnabled="{Binding WorkingPathStr, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type l:GameStateParameterPicker}}, Converter={StaticResource IsStringNotNullConv}}" Margin="6" Padding="6,2" Click="BackBtn_Click" />
<TextBlock Text="{Binding WorkingPathStr, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type l:GameStateParameterPicker}}}" Margin="6,0,6,6" VerticalAlignment="Center" />
</StackPanel>

<!-- List boxes (aux is for animation) -->
<ListBox x:Name="mainListBox" Grid.Row="1" ItemsSource="{Binding CurrentParameterListItems, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type l:GameStateParameterPicker}}}" ItemTemplate="{StaticResource ListItemTemplate}" SelectedValuePath="Path" Width="{Binding ActualWidth, ElementName=popupContent}" HorizontalAlignment="Left" l:GameStateParameterPicker.TransformRelativeOffset="0" RenderTransform="{l:DoubleToRelativeTransformOffset}" PreviewMouseLeftButtonDown="MainListBox_PreviewMouseLeftButtonDown" />
<ListBox x:Name="auxillaryListbox" Grid.Row="1" ItemTemplate="{StaticResource ListItemTemplate}" Width="{Binding ActualWidth, ElementName=popupContent}" SelectedValuePath="Path" HorizontalAlignment="Left" l:GameStateParameterPicker.TransformRelativeOffset="-1" RenderTransform="{l:DoubleToRelativeTransformOffset}" />

<!-- Numeric input for numeric types -->
<DockPanel Grid.Row="2" LastChildFill="True">
<TextBlock Text="Or enter number:" VerticalAlignment="Center" Margin="6,4,0,6" DockPanel.Dock="Left" />
<xctk:DoubleUpDown x:Name="numericEntry" Margin="6" ValueChanged="NumericEntry_ValueChanged" />
</DockPanel>

<!-- Border around all popup content -->
<Border BorderBrush="#454545" BorderThickness="1" Grid.RowSpan="999" />
</Grid>
</Popup>
</Grid>
</UserControl>
Loading