diff --git a/GFramework.Core.Abstractions/GFramework.Core.Abstractions.csproj b/GFramework.Core.Abstractions/GFramework.Core.Abstractions.csproj index 7c51016..1330021 100644 --- a/GFramework.Core.Abstractions/GFramework.Core.Abstractions.csproj +++ b/GFramework.Core.Abstractions/GFramework.Core.Abstractions.csproj @@ -15,4 +15,14 @@ + + + all + runtime; build; native; contentfiles; analyzers + + + all + runtime; build; native; contentfiles; analyzers + + diff --git a/GFramework.Core.Tests/GFramework.Core.Tests.csproj b/GFramework.Core.Tests/GFramework.Core.Tests.csproj index 2392396..e505aab 100644 --- a/GFramework.Core.Tests/GFramework.Core.Tests.csproj +++ b/GFramework.Core.Tests/GFramework.Core.Tests.csproj @@ -8,7 +8,7 @@ - + diff --git a/GFramework.Game.Abstractions/GFramework.Game.Abstractions.csproj b/GFramework.Game.Abstractions/GFramework.Game.Abstractions.csproj index bfa355a..75e2628 100644 --- a/GFramework.Game.Abstractions/GFramework.Game.Abstractions.csproj +++ b/GFramework.Game.Abstractions/GFramework.Game.Abstractions.csproj @@ -17,4 +17,14 @@ + + + all + runtime; build; native; contentfiles; analyzers + + + all + runtime; build; native; contentfiles; analyzers + + diff --git a/GFramework.Game.Abstractions/ui/IUiFactory.cs b/GFramework.Game.Abstractions/ui/IUiFactory.cs index fc8a715..56f78e1 100644 --- a/GFramework.Game.Abstractions/ui/IUiFactory.cs +++ b/GFramework.Game.Abstractions/ui/IUiFactory.cs @@ -12,5 +12,5 @@ public interface IUiFactory : IContextUtility /// /// UI标识键,用于确定要创建的具体UI页面类型 /// 创建的UI页面实例,实现IUiPage接口 - IPageBehavior Create(string uiKey); + IUiPageBehavior Create(string uiKey); } \ No newline at end of file diff --git a/GFramework.Game.Abstractions/ui/IPageBehavior.cs b/GFramework.Game.Abstractions/ui/IUiPageBehavior.cs similarity index 90% rename from GFramework.Game.Abstractions/ui/IPageBehavior.cs rename to GFramework.Game.Abstractions/ui/IUiPageBehavior.cs index 7307cd6..76c9c2a 100644 --- a/GFramework.Game.Abstractions/ui/IPageBehavior.cs +++ b/GFramework.Game.Abstractions/ui/IUiPageBehavior.cs @@ -1,9 +1,9 @@ namespace GFramework.Game.Abstractions.ui; /// -/// UI页面接口,定义了UI页面的生命周期方法 +/// UI页面行为接口,定义了UI页面的生命周期方法和状态管理 /// -public interface IPageBehavior +public interface IUiPageBehavior { /// /// 获取页面视图对象 diff --git a/GFramework.Game.Abstractions/ui/IUiPageBehaviorProvider.cs b/GFramework.Game.Abstractions/ui/IUiPageBehaviorProvider.cs index 28b77b8..8bb5c15 100644 --- a/GFramework.Game.Abstractions/ui/IUiPageBehaviorProvider.cs +++ b/GFramework.Game.Abstractions/ui/IUiPageBehaviorProvider.cs @@ -9,5 +9,5 @@ public interface IUiPageBehaviorProvider /// 获取页面行为实例 /// /// 页面行为接口实例 - IPageBehavior GetPage(); + IUiPageBehavior GetPage(); } \ No newline at end of file diff --git a/GFramework.Game.Abstractions/ui/IUiRoot.cs b/GFramework.Game.Abstractions/ui/IUiRoot.cs index 6785d72..f3f74cf 100644 --- a/GFramework.Game.Abstractions/ui/IUiRoot.cs +++ b/GFramework.Game.Abstractions/ui/IUiRoot.cs @@ -9,11 +9,11 @@ public interface IUiRoot /// 向UI根节点添加子页面 /// /// 要添加的UI页面子节点 - void AddUiPage(IPageBehavior child); + void AddUiPage(IUiPageBehavior child); /// /// 从UI根节点移除子页面 /// /// 要移除的UI页面子节点 - void RemoveUiPage(IPageBehavior child); + void RemoveUiPage(IUiPageBehavior child); } \ No newline at end of file diff --git a/GFramework.Game/GFramework.Game.csproj b/GFramework.Game/GFramework.Game.csproj index 13983d2..b81965b 100644 --- a/GFramework.Game/GFramework.Game.csproj +++ b/GFramework.Game/GFramework.Game.csproj @@ -11,6 +11,6 @@ - + diff --git a/GFramework.Game/ui/UiRouterBase.cs b/GFramework.Game/ui/UiRouterBase.cs index cb7678f..99e8cc4 100644 --- a/GFramework.Game/ui/UiRouterBase.cs +++ b/GFramework.Game/ui/UiRouterBase.cs @@ -22,7 +22,7 @@ public abstract class UiRouterBase : AbstractSystem, IUiRouter /// /// 页面栈,用于管理UI页面的显示顺序 /// - private readonly Stack _stack = new(); + private readonly Stack _stack = new(); /// /// UI工厂实例,用于创建UI相关的对象 diff --git a/GFramework.Godot.SourceGenerators.Abstractions/GFramework.Godot.SourceGenerators.Abstractions.csproj b/GFramework.Godot.SourceGenerators.Abstractions/GFramework.Godot.SourceGenerators.Abstractions.csproj index 477e9bc..2e67264 100644 --- a/GFramework.Godot.SourceGenerators.Abstractions/GFramework.Godot.SourceGenerators.Abstractions.csproj +++ b/GFramework.Godot.SourceGenerators.Abstractions/GFramework.Godot.SourceGenerators.Abstractions.csproj @@ -18,4 +18,14 @@ + + + all + runtime; build; native; contentfiles; analyzers + + + all + runtime; build; native; contentfiles; analyzers + + diff --git a/GFramework.Godot/ui/CanvasItemPageBehavior.cs b/GFramework.Godot/ui/CanvasItemUiPageBehavior.cs similarity index 96% rename from GFramework.Godot/ui/CanvasItemPageBehavior.cs rename to GFramework.Godot/ui/CanvasItemUiPageBehavior.cs index bf2fa4c..94da6db 100644 --- a/GFramework.Godot/ui/CanvasItemPageBehavior.cs +++ b/GFramework.Godot/ui/CanvasItemUiPageBehavior.cs @@ -9,7 +9,7 @@ namespace GFramework.Godot.ui; /// 支持所有继承自 CanvasItem 的节点 /// /// CanvasItem 类型的视图节点 -public class CanvasItemPageBehavior(T owner) : IPageBehavior +public class CanvasItemUiPageBehavior(T owner) : IUiPageBehavior where T : CanvasItem { private readonly IUiPage? _page = owner as IUiPage; diff --git a/GFramework.Godot/ui/GodotUiFactory.cs b/GFramework.Godot/ui/GodotUiFactory.cs index 35f160c..c763bb8 100644 --- a/GFramework.Godot/ui/GodotUiFactory.cs +++ b/GFramework.Godot/ui/GodotUiFactory.cs @@ -22,7 +22,7 @@ public class GodotUiFactory : AbstractContextUtility, IUiFactory /// UI资源的唯一标识键 /// 实现IUiPage接口的UI页面实例 /// 当UI场景没有继承IUiPage接口时抛出 - public IPageBehavior Create(string uiKey) + public IUiPageBehavior Create(string uiKey) { // 从注册表中获取对应的场景资源 var scene = _registry.Get(uiKey); diff --git a/GFramework.SourceGenerators.Abstractions/GFramework.SourceGenerators.Abstractions.csproj b/GFramework.SourceGenerators.Abstractions/GFramework.SourceGenerators.Abstractions.csproj index fe720ee..7fe590d 100644 --- a/GFramework.SourceGenerators.Abstractions/GFramework.SourceGenerators.Abstractions.csproj +++ b/GFramework.SourceGenerators.Abstractions/GFramework.SourceGenerators.Abstractions.csproj @@ -17,4 +17,14 @@ + + + all + runtime; build; native; contentfiles; analyzers + + + all + runtime; build; native; contentfiles; analyzers + + diff --git a/GFramework.SourceGenerators.Common/GFramework.SourceGenerators.Common.csproj b/GFramework.SourceGenerators.Common/GFramework.SourceGenerators.Common.csproj index eb20b60..32e6407 100644 --- a/GFramework.SourceGenerators.Common/GFramework.SourceGenerators.Common.csproj +++ b/GFramework.SourceGenerators.Common/GFramework.SourceGenerators.Common.csproj @@ -22,6 +22,14 @@ runtime; build; native; contentfiles; analyzers + + all + runtime; build; native; contentfiles; analyzers + + + all + runtime; build; native; contentfiles; analyzers + diff --git a/GFramework.SourceGenerators.Tests/GFramework.SourceGenerators.Tests.csproj b/GFramework.SourceGenerators.Tests/GFramework.SourceGenerators.Tests.csproj index 3679072..e60f46a 100644 --- a/GFramework.SourceGenerators.Tests/GFramework.SourceGenerators.Tests.csproj +++ b/GFramework.SourceGenerators.Tests/GFramework.SourceGenerators.Tests.csproj @@ -12,10 +12,10 @@ - + - +