forked from Misaki/GhostEngine
Added `InternalsVisibleTo` attribute for "Ghost.Graphics" and "Ghost.Editor" in `AssemblyInfo.cs`. Added a new `EngineAssemblyAttribute` in `EngineAssemblyAttribute.cs`. Added a reference to `Misaki.HighPerformance.Unsafe` in `Ghost.Core.csproj`. Added a new `Bounds` struct to represent axis-aligned bounding boxes in `Bounds.cs`. Added new `Color32` and `Color128` structs for color representation in `Color.cs`. Changed the namespace from `Ghost.Editor.Controls` to `Ghost.Editor.Core.Controls` in multiple files. Changed the implicit conversion operator in `ConstPtr<T>` to use a more descriptive parameter name in `ConstPtr.cs`. Changed the `Mesh` class to use `Color128` instead of `Color32` for color representation. Enhanced the `TypeCache` class to load types from assemblies marked with `EngineAssemblyAttribute`. Enhanced the `ProjectService` class to improve the `GetAllProjectAsync` method by filtering out bad projects. Enhanced the `GraphicsPipeline` class to support both DX12 and D3D12 graphics APIs. Enhanced the `Shader` class to include methods for compiling HLSL shaders and managing root signatures. Enhanced the `MeshRenderPass` class to utilize the new shader compilation methods. Refactored the `AppStateMachine` class to use private fields instead of static fields for state management. Refactored the `ComponentDataView` class to use the new namespace and improve organization. Refactored project references in `Ghost.Graphics.csproj` to include new dependencies and remove outdated ones. Made various adjustments to ensure consistency and improve code quality across multiple files.
143 lines
5.8 KiB
XML
143 lines
5.8 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<Page
|
|
x:Class="Ghost.Editor.View.Pages.Landing.CreateProjectPage"
|
|
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:data="using:Ghost.Data.Models"
|
|
xmlns:editor="using:Ghost.Editor.Core.Controls"
|
|
xmlns:local="using:Ghost.Editor.View.Pages.Landing"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
NavigationCacheMode="Enabled"
|
|
mc:Ignorable="d">
|
|
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Template Info -->
|
|
<Grid Grid.Column="0" Width="300">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Margin="0,0,0,24"
|
|
Style="{StaticResource SubtitleTextBlockStyle}"
|
|
Text="Template" />
|
|
|
|
<ListView
|
|
Grid.Row="1"
|
|
ItemsSource="{x:Bind ViewModel.templates}"
|
|
SelectedItem="{x:Bind ViewModel.SelectedTemplate, Mode=TwoWay}">
|
|
<ListView.ItemTemplate>
|
|
<DataTemplate x:DataType="data:TemplateData">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<ImageIcon
|
|
Grid.Column="0"
|
|
Width="24"
|
|
Height="24">
|
|
<ImageIcon.Source>
|
|
<BitmapImage UriSource="{x:Bind GetIconURI()}" />
|
|
</ImageIcon.Source>
|
|
</ImageIcon>
|
|
<TextBlock
|
|
Grid.Column="1"
|
|
Margin="8,0"
|
|
VerticalAlignment="Center"
|
|
Text="{x:Bind Info.Name}" />
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ListView.ItemTemplate>
|
|
</ListView>
|
|
</Grid>
|
|
|
|
<!-- Project Info -->
|
|
<Grid
|
|
Grid.Column="1"
|
|
Margin="16,0,0,0"
|
|
Padding="16"
|
|
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
|
CornerRadius="{StaticResource OverlayCornerRadius}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="300" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid Grid.Row="0" CornerRadius="4">
|
|
<Image VerticalAlignment="Center" Stretch="UniformToFill">
|
|
<Image.Source>
|
|
<BitmapImage UriSource="{x:Bind ViewModel.SelectedTemplate.Value.GetPreviewURI(), Mode=OneWay}" />
|
|
</Image.Source>
|
|
</Image>
|
|
<Grid
|
|
MaxHeight="100"
|
|
VerticalAlignment="Bottom"
|
|
Background="{ThemeResource ControlOnImageFillColorDefaultBrush}">
|
|
<TextBlock
|
|
Margin="16"
|
|
VerticalAlignment="Bottom"
|
|
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
|
|
Text="{x:Bind ViewModel.SelectedTemplate.Value.Info.Description, Mode=OneWay}" />
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<StackPanel Grid.Row="1" Margin="8,0">
|
|
<TextBlock
|
|
Margin="0,16,0,8"
|
|
Style="{StaticResource TitleTextBlockStyle}"
|
|
Text="{x:Bind ViewModel.SelectedTemplate.Value.Info.Name, Mode=OneWay}" />
|
|
<TextBlock
|
|
Margin="0,8,0,16"
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
Style="{StaticResource SubtitleTextBlockStyle}"
|
|
Text="Project Settings" />
|
|
|
|
<editor:PropertyField Label="Name">
|
|
<TextBox Text="{x:Bind ViewModel.ProjectName, Mode=TwoWay}" />
|
|
</editor:PropertyField>
|
|
<editor:PropertyField Label="Location">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBox
|
|
Grid.Column="0"
|
|
IsReadOnly="True"
|
|
Text="{x:Bind ViewModel.ProjectLocation, Mode=TwoWay}" />
|
|
<Button
|
|
Grid.Column="1"
|
|
Margin="4,0,0,0"
|
|
VerticalAlignment="Stretch"
|
|
Command="{x:Bind ViewModel.SelectionProjectLocationCommand}">
|
|
<FontIcon FontSize="16" Glyph="" />
|
|
</Button>
|
|
</Grid>
|
|
</editor:PropertyField>
|
|
</StackPanel>
|
|
|
|
<Grid Grid.Row="2">
|
|
<Button
|
|
Width="150"
|
|
HorizontalAlignment="Right"
|
|
Command="{x:Bind ViewModel.CreateProjectCommand}"
|
|
Content="Create"
|
|
Style="{ThemeResource AccentButtonStyle}" />
|
|
</Grid>
|
|
</Grid>
|
|
|
|
</Grid>
|
|
</Page>
|