forked from Misaki/GhostEngine
Refactor project from Ghost.App to Ghost.Editor
Changed the project structure to reflect a shift from `Ghost.App` to `Ghost.Editor`, updating namespaces and class names throughout. Changed the application class in `App.xaml` and `App.xaml.cs` from `GhostApplication` to `EditorApplication`. Changed several service interfaces to reside under `Ghost.Editor.Services.Contracts`, including `IInspectorService`, `INotificationService`, and `IProgressService`. Added `InspectorView` and `InspectorViewModel` classes to manage inspector functionality. Added `NavigationTabView` and `NavigationTabPage` classes to facilitate navigation within the editor. Enhanced `WorldNode` and `EntityNode` classes to support scene graph functionality, including serialization and entity management. Updated the project file `Ghost.Editor.csproj` to reflect the new structure and removed old references. Modified the solution file `GhostEngine.sln` to remove references to `Ghost.App` and include `Ghost.Editor`. Updated unit tests to align with the new namespaces and project structure.
This commit is contained in:
14
Ghost.App/Services/Contracts/IInspectorService.cs
Normal file
14
Ghost.App/Services/Contracts/IInspectorService.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Ghost.Editor.Contracts;
|
||||
|
||||
namespace Ghost.Editor.Services.Contracts;
|
||||
|
||||
internal interface IInspectorService
|
||||
{
|
||||
public IInspectable? SelectedInspectable
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public event Action? OnSelectionChanged;
|
||||
}
|
||||
8
Ghost.App/Services/Contracts/INotificationService.cs
Normal file
8
Ghost.App/Services/Contracts/INotificationService.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using Ghost.Editor.Models;
|
||||
|
||||
namespace Ghost.Editor.Services.Contracts;
|
||||
|
||||
public interface INotificationService
|
||||
{
|
||||
public void ShowNotification(string? message, MessageType type, int duration = 5, string? title = null);
|
||||
}
|
||||
9
Ghost.App/Services/Contracts/IProgressService.cs
Normal file
9
Ghost.App/Services/Contracts/IProgressService.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace Ghost.Editor.Services.Contracts;
|
||||
|
||||
public interface IProgressService
|
||||
{
|
||||
public void ShowProgress(string message, double progress = 0.0);
|
||||
public void ShowIndeterminateProgress(string message);
|
||||
public void SetProgress(double progress);
|
||||
public void HideProgress();
|
||||
}
|
||||
22
Ghost.App/Services/InspectorService.cs
Normal file
22
Ghost.App/Services/InspectorService.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Ghost.Editor.Contracts;
|
||||
using Ghost.Editor.Services.Contracts;
|
||||
|
||||
namespace Ghost.Editor.Services;
|
||||
|
||||
public class InspectorService : IInspectorService
|
||||
{
|
||||
public IInspectable? SelectedInspectable
|
||||
{
|
||||
get => field;
|
||||
set
|
||||
{
|
||||
if (field != value)
|
||||
{
|
||||
field = value;
|
||||
OnSelectionChanged?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public event Action? OnSelectionChanged;
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using Ghost.Editor.Services.Contracts;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using System;
|
||||
|
||||
namespace Ghost.App.Services;
|
||||
namespace Ghost.Editor.Services;
|
||||
|
||||
public class NotificationService : INotificationService
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@ using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Ghost.App.Services;
|
||||
namespace Ghost.Editor.Services;
|
||||
|
||||
public class ProgressService : IProgressService
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user