GeWuYou 88ced1ac55 refactor(ui): 重构UI层级管理系统
- 移除 System.Collections.Generic 和 System 的 using 语句
- 添加 GFramework.Game.Abstractions.enums 的 using 语句
- 添加静态只读字典 LayerZOrderMap 来管理 UI 层级 Z 轴顺序
- 修改 AddUiPage 方法参数,使用 UiLayer 枚举替代 zOrder 参数
- 使用 TryAdd 方法替换 ContainsKey 判断逻辑
- 使用 Remove 方法的重载版本来简化页面移除逻辑
- 删除 RefreshLayerOrder 方法
- 添加 GetBaseZOrder 辅助方法来获取基础 Z 轴顺序
- 更新 UiLayer 枚举定义,移除显式的数值赋值
- 更新 IUiRoot 接口中的 AddUiPage 方法签名
- 删除 IUiRoot 接口中 RefreshLayerOrder 方法
- 更新 UiRouterBase 中调用 AddUiPage 方法的方式,传递 UiLayer 参数
2026-01-20 12:51:48 +08:00

34 lines
748 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace GFramework.Game.Abstractions.enums;
/// <summary>
/// UI层级枚举定义UI界面的显示层级
/// 用于管理不同类型的UI在屏幕上的显示顺序
/// </summary>
public enum UiLayer
{
/// <summary>
/// 页面层使用栈管理UI的切换
/// </summary>
Page,
/// <summary>
/// 浮层,用于覆盖层、对话框等
/// </summary>
Overlay,
/// <summary>
/// 模态层,会阻挡下层交互,带有遮罩效果
/// </summary>
Modal,
/// <summary>
/// 提示层用于轻量提示如toast消息、loading指示器等
/// </summary>
Toast,
/// <summary>
/// 顶层,用于系统级弹窗、全屏加载等
/// </summary>
Topmost
}