Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
1,024 changes: 706 additions & 318 deletions Algorithms/GridShaper.cs

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System.Configuration;
using System.Data;
using SpaceEditor.Data;
using System.Windows;
using SpaceEditor.Data;

namespace SpaceEditor
{
Expand Down
12 changes: 4 additions & 8 deletions Controls/AsyncView.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows;
using System.Windows.Controls;

namespace SpaceEditor.Controls;
Expand All @@ -15,7 +11,7 @@ public AsyncView()
{
this.DataContextChanged += OnDataContextChanged;
this.Unloaded += OnUnloaded;

InitializeComponent();
}

Expand All @@ -34,7 +30,7 @@ private async void OnDataContextChanged(object sender, DependencyPropertyChanged

this.Lifetime?.Cancel();
this.Lifetime = new();

var lifetime = this.Lifetime.Token;

this.LoadingContent.Visibility = Visibility.Visible;
Expand All @@ -45,7 +41,7 @@ private async void OnDataContextChanged(object sender, DependencyPropertyChanged
try
{
await data.WaitAsync(lifetime);

this.LoadingContent.Visibility = Visibility.Collapsed;
this.MainContent.Visibility = Visibility.Visible;
}
Expand Down
41 changes: 36 additions & 5 deletions Controls/BlueprintGenerator.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
xmlns:local="clr-namespace:SpaceEditor.Controls"
xmlns:colorPicker="clr-namespace:ColorPicker;assembly=ColorPicker"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
d:DesignHeight="450" d:DesignWidth="800"
PreviewKeyDown="UserControl_PreviewKeyDown">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
Expand Down Expand Up @@ -47,10 +48,40 @@
<local:ReflectedObject x:Name="ModelSettings" Grid.Column="1" />
</Grid>

<Button
Click="GenerateBlueprint"
Content="The Preview looks good. Convert it to Blueprint!"
/>
<Grid>
<Button x:Name="GenerateButton" Click="GenerateBlueprint" Content="The Preview looks good. Convert it to Blueprint!" ToolTipService.Placement="Mouse">
<Button.ToolTip>
<ToolTip>
<StackPanel Orientation="Vertical" Margin="2">
<!-- Header -->
<TextBlock Text="Generation Controls" FontWeight="Bold" Margin="0,0,0,4" />

<!-- Description -->
<TextBlock Text="Will generate a blueprint based on the loaded model on the right and the selected options above." />
<TextBlock Text="Blueprint will be layed over the model, use the Draw and Xray toggles for both to adjust the view." />
<TextBlock Text="Hold 'Shift' while clicking the button to use CPU instead of GPU." />
<TextBlock Text="It's slower and more likely to hang, use it if the process fails for some reason." />
<TextBlock Text="In any case, you can press the 'Esc' key once the blueprint generation is running to cancel it." />
</StackPanel>
</ToolTip>
</Button.ToolTip>
</Button>
<Grid x:Name="ProgressOverlay" Visibility="Collapsed">
<ProgressBar
x:Name="GenerateProgress"
Minimum="0" Maximum="100" Value="0"
Height="25"
/>
<TextBlock
x:Name="ProgressText"
Text="Initializing..."
HorizontalAlignment="Center"
VerticalAlignment="Center"
Foreground="Black"
FontWeight="SemiBold"
/>
</Grid>
</Grid>
</StackPanel>

<StackPanel
Expand Down
Loading