GeWuYou 2e7fd1fc87 feat(ui): 添加UI路由基类和相关接口定义
- 实现UiRouterBase基类,提供页面栈管理和层级UI管理功能
- 定义IUiPageBehavior接口,规范UI页面生命周期方法和状态管理
- 定义IUiRouter接口,统一UI界面导航和切换操作规范
- 实现页面栈操作功能,包括Push、Pop、Replace、Clear等方法
- 实现层级UI管理功能,支持Overlay、Modal、Toast等浮层显示
- 集成UI过渡管道,支持UI切换动画和逻辑处理
- 添加暂停令牌管理,实现页面可见性驱动的暂停控制
- 实现UI动作捕获和分发机制,支持语义动作处理
2026-04-17 22:00:33 +08:00

18 lines
613 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.UI;
/// <summary>
/// 由页面视图实现,用于接收路由仲裁后的 UI 语义动作。
/// </summary>
public interface IUiActionHandler
{
/// <summary>
/// 处理一个 UI 语义动作。
/// </summary>
/// <param name="action">当前要处理的动作。</param>
/// <returns>
/// 如果页面已经完成处理则返回 <see langword="true" />
/// 返回 <see langword="false" /> 时,路由器仍会把声明捕获该动作视为已消费。
/// </returns>
bool TryHandleUiAction(UiInputAction action);
}