添加了教育平台
This commit is contained in:
@@ -67,19 +67,27 @@ public partial class UXService : Control
|
||||
/// <param name="panel">UX面板</param>
|
||||
public static void UnRegister(IUXPanel panel)
|
||||
{
|
||||
UnRegistryQueue.Enqueue(panel);
|
||||
}
|
||||
|
||||
public static void Open<T>() where T : IUXPanel
|
||||
{
|
||||
}
|
||||
|
||||
public static void Open(IUXPanel panel) => EnableQueue.Push(panel);
|
||||
|
||||
public static void Open(Control control)
|
||||
public static void Return()
|
||||
{
|
||||
|
||||
if (History.TryPop(out _))
|
||||
{
|
||||
if(History.TryPop(out var returnPanel))
|
||||
{
|
||||
Open(returnPanel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void Open(IUXPanel panel) => EnableQueue.Push(panel);
|
||||
|
||||
public static void Open(Control control)=>Open(control as IUXPanel);
|
||||
public static void Open(string name)
|
||||
{
|
||||
|
||||
@@ -89,6 +97,11 @@ public partial class UXService : Control
|
||||
/// 内部注册面板队列
|
||||
/// </summary>
|
||||
private static readonly Queue<IUXPanel> RegistryQueue = new();
|
||||
|
||||
/// <summary>
|
||||
/// 内部注销面板队列
|
||||
/// </summary>
|
||||
private static readonly Queue<IUXPanel> UnRegistryQueue = new();
|
||||
|
||||
/// <summary>
|
||||
/// 已注册面板字典
|
||||
@@ -106,11 +119,9 @@ public partial class UXService : Control
|
||||
private static readonly Stack<IUXPanel> EnabledPanels = new();
|
||||
|
||||
/// <summary>
|
||||
/// 等待隐藏的面板
|
||||
/// 历史面板
|
||||
/// </summary>
|
||||
private static readonly Stack<IUXPanel> WActivatedPanels = new();
|
||||
|
||||
|
||||
private static readonly Stack<IUXPanel> History = new();
|
||||
|
||||
/// <summary>
|
||||
/// 正在播放过渡动画的面板
|
||||
@@ -125,6 +136,10 @@ public partial class UXService : Control
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (TransitionPanles.Count is not 0) return;
|
||||
while (UnRegistryQueue.TryDequeue(out var result))
|
||||
{
|
||||
Panels.Remove(result.Index);
|
||||
}
|
||||
while (RegistryQueue.TryDequeue(out var result))
|
||||
{
|
||||
Panels.Add(result.Index, result);
|
||||
@@ -138,6 +153,7 @@ public partial class UXService : Control
|
||||
}
|
||||
next.Entry();
|
||||
EnabledPanels.Push(next);
|
||||
History.Push(next);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user