breakpoint
This commit is contained in:
@@ -4,43 +4,9 @@ using System.Linq;
|
||||
using System.Xml;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace BITKit;
|
||||
/// <summary>
|
||||
/// 基本UX面板接口,定义了基本的UX面板功能
|
||||
/// </summary>
|
||||
/// <para>⭐同步打开与关闭</para>
|
||||
/// <para>⭐异步打开与关闭</para>
|
||||
/// <para>⭐当前可见状态</para>
|
||||
/// <para>⭐基本UI导航回调</para>
|
||||
public interface IUXPanel
|
||||
{
|
||||
/// <summary>
|
||||
/// 该面板是否具有动画
|
||||
/// </summary>
|
||||
bool IsAnimate { get; }
|
||||
/// <summary>
|
||||
/// 该面板的索引(入口,Key)
|
||||
/// </summary>
|
||||
string Index { get; }
|
||||
/// <summary>
|
||||
/// 该面板是否启用指针
|
||||
/// </summary>
|
||||
bool AllowCursor { get; }
|
||||
/// <summary>
|
||||
/// 该面板是否启用玩家输入
|
||||
/// </summary>
|
||||
bool AllowInput { get; }
|
||||
void Entry();
|
||||
void Exit();
|
||||
}
|
||||
namespace BITKit.UX;
|
||||
|
||||
/// <summary>
|
||||
/// 基本UX服务(GUI管理器),主要通过加载叠加面板实现
|
||||
/// </summary>
|
||||
/// <para>使用方式:</para>
|
||||
///
|
||||
///
|
||||
public partial class UXService : Control
|
||||
public partial class UXService : Control, IUXService
|
||||
{
|
||||
private static UXService Singleton;
|
||||
|
||||
@@ -53,19 +19,13 @@ public partial class UXService : Control
|
||||
Singleton = this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 注册面板,加入注册队列
|
||||
/// </summary>
|
||||
/// <param name="panel">UX面板</param>
|
||||
|
||||
public static void Register(IUXPanel panel)
|
||||
{
|
||||
RegistryQueue.Enqueue(panel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 注销面板
|
||||
/// </summary>
|
||||
/// <param name="panel">UX面板</param>
|
||||
|
||||
public static void UnRegister(IUXPanel panel)
|
||||
{
|
||||
UnRegistryQueue.Enqueue(panel);
|
||||
@@ -131,11 +91,7 @@ public partial class UXService : Control
|
||||
|
||||
private static InitializationState InitializationState;
|
||||
|
||||
private void _Entry(IUXPanel panel)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (TransitionPanles.Count is not 0) return;
|
||||
@@ -169,4 +125,10 @@ public partial class UXService : Control
|
||||
EnabledPanels.Push(next);
|
||||
History.Push(next);
|
||||
}
|
||||
void IUXService.Register(IUXPanel panel)=>Register(panel);
|
||||
void IUXService.UnRegister(IUXPanel panel)=>UnRegister(panel);
|
||||
void IUXService.Entry<T>() => Open<T>();
|
||||
void IUXService.Return() => Return();
|
||||
void IUXService.Entry(IUXPanel panel) => Open(panel);
|
||||
void IUXService.Entry(string panelName) => Open(panelName);
|
||||
}
|
||||
|
Reference in New Issue
Block a user