Changed the `ProjectRepository` class to be static for easier usage. Changed `ProjectService` constants to public properties for accessibility. Changed `App.xaml` to consolidate theme resources into `Override.xaml`. Changed `App.xaml.cs` to implement an `AppStateMachine` for better state management. Changed `ConsolePage` and `HierarchyPage` to utilize the new ViewModel structure. Changed `ProjectPage` to use the `ExplorerItem` model for asset display. Changed `Entity` and `EntityManager` to enhance component management with a new `IComponentData` interface. Changed the `Logger` class to introduce structured logging functionality. Changed the system architecture to support dependency management for better organization. Changed the `QueryEnumerable` class to allow for more flexible entity queries. Changed the `TypeHandle` class to improve efficiency in retrieving type handles. Changed the `World` class to support robust world management and multiple worlds. Updated the `Test` class to demonstrate the new entity and component management system.
165 lines
7.0 KiB
XML
165 lines
7.0 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<Page
|
|
x:Class="Ghost.Editor.View.Pages.Landing.OpenProjectPage"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:converters="using:Ghost.Editor.Helpers.Converters"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:data="using:Ghost.Data.Models"
|
|
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
|
|
xmlns:local="using:Ghost.Editor.View.Pages.Landing"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
NavigationCacheMode="Enabled"
|
|
mc:Ignorable="d">
|
|
|
|
<Page.Resources>
|
|
<converters:GetDirectoryNameConverter x:Key="DirNameConverter" />
|
|
</Page.Resources>
|
|
|
|
<Grid x:Name="MainContainer">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid Grid.Row="0" Margin="16,4">
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Style="{StaticResource SubtitleTextBlockStyle}"
|
|
Text="Projects" />
|
|
<AutoSuggestBox
|
|
Width="300"
|
|
HorizontalAlignment="Right"
|
|
PlaceholderText="Search project by name"
|
|
QueryIcon="Find" />
|
|
</Grid>
|
|
|
|
<!-- Header for the ListView -->
|
|
<Grid Grid.Row="1" Margin="28,16,45,8">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="200" />
|
|
<ColumnDefinition Width="165" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock
|
|
Grid.Column="0"
|
|
Style="{StaticResource CaptionTextBlockStyle}"
|
|
Text="NAME" />
|
|
<TextBlock
|
|
Grid.Column="1"
|
|
HorizontalAlignment="Right"
|
|
Style="{StaticResource CaptionTextBlockStyle}"
|
|
Text="LAST OPEN" />
|
|
<TextBlock
|
|
Grid.Column="2"
|
|
HorizontalAlignment="Right"
|
|
Style="{StaticResource CaptionTextBlockStyle}"
|
|
Text="ENGINE VERSION" />
|
|
</Grid>
|
|
|
|
<!-- Project ListView -->
|
|
<Grid
|
|
Grid.Row="2"
|
|
Padding="8"
|
|
AllowDrop="True"
|
|
DragEnter="ProjectContainer_DragEnter"
|
|
DragLeave="ProjectContainer_DragLeave"
|
|
DragOver="ProjectContainer_DragOver"
|
|
Drop="ProjectContainer_Drop">
|
|
<ListView
|
|
Padding="4,8"
|
|
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
|
CornerRadius="{StaticResource OverlayCornerRadius}"
|
|
IsItemClickEnabled="True"
|
|
ItemClick="ListView_ItemClick"
|
|
ItemsSource="{x:Bind ViewModel.projects}"
|
|
SelectionMode="None">
|
|
<ListView.ItemTemplate>
|
|
<DataTemplate x:DataType="data:ProjectMetadataInfo">
|
|
<Grid Height="64" Padding="4,8">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="200" />
|
|
<ColumnDefinition Width="100" />
|
|
<ColumnDefinition Width="65" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid Grid.Column="0" VerticalAlignment="Center">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
VerticalAlignment="Center"
|
|
FontSize="16"
|
|
Style="{StaticResource SubtitleTextBlockStyle}"
|
|
Text="{x:Bind Metadata.Name}" />
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
Margin="0,4,0,0"
|
|
VerticalAlignment="Center"
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
Style="{StaticResource CaptionTextBlockStyle}"
|
|
Text="{x:Bind Path, Converter={StaticResource DirNameConverter}}" />
|
|
</Grid>
|
|
|
|
<TextBlock
|
|
Grid.Column="1"
|
|
Margin="16,4"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Text="{x:Bind Metadata.LastOpened}" />
|
|
<TextBlock
|
|
Grid.Column="2"
|
|
Margin="16,4"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Text="{x:Bind Metadata.EngineVersion}" />
|
|
<Button
|
|
Grid.Column="3"
|
|
HorizontalAlignment="Right"
|
|
Background="Transparent"
|
|
BorderThickness="0">
|
|
<FontIcon Glyph="" />
|
|
</Button>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ListView.ItemTemplate>
|
|
</ListView>
|
|
|
|
<!-- Drag Visual -->
|
|
<Grid
|
|
x:Name="DragVisual"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
Background="{ThemeResource CardStrokeColorDefaultBrush}"
|
|
BorderBrush="{ThemeResource ControlStrongStrokeColorDefaultBrush}"
|
|
BorderThickness="2"
|
|
CornerRadius="{StaticResource OverlayCornerRadius}"
|
|
Visibility="Collapsed">
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
Style="{StaticResource TitleTextBlockStyle}"
|
|
Text="Drage Project Folder Here" />
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<!-- Empty Place Holder -->
|
|
<Grid
|
|
x:Name="EmptyPlaceHolder"
|
|
Grid.Row="2"
|
|
Visibility="Collapsed">
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Style="{StaticResource TitleTextBlockStyle}"
|
|
Text="No projects found" />
|
|
</Grid>
|
|
</Grid>
|
|
</Page> |