feat(ui): 添加录制工具面板
新增 RecordingToolPanel,按 Ctrl+R 唤出侧边栏,可独立控制光标、 版本号、Top Bar 与对话视觉的显隐。移除旧的 UIEventEnum.RecordingModeChanged 事件,改为各子系统提供显式 SetVisible API。在 Persistence 场景中配置面板层级与四个开关。
This commit is contained in:
@@ -13,6 +13,7 @@ namespace AibisDream
|
||||
public Sprite nextTalk, talking, option, interactive, holding, disable;
|
||||
|
||||
private Image _cursor;
|
||||
private bool _cursorVisible = true;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
@@ -23,29 +24,26 @@ namespace AibisDream
|
||||
#else
|
||||
InitCursor();
|
||||
#endif
|
||||
EnumEventSystem.Global.Register<UIEventEnum, bool>(UIEventEnum.RecordingModeChanged, OnRecordingModeChanged);
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
EnumEventSystem.Global.UnRegister<UIEventEnum, bool>(UIEventEnum.RecordingModeChanged, OnRecordingModeChanged);
|
||||
}
|
||||
|
||||
private void OnRecordingModeChanged(bool isRecording)
|
||||
public void SetCursorVisible(bool visible)
|
||||
{
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
return;
|
||||
#endif
|
||||
|
||||
_cursorVisible = visible;
|
||||
ApplyCursorVisibility();
|
||||
}
|
||||
|
||||
private void ApplyCursorVisibility()
|
||||
{
|
||||
if (_cursor != null)
|
||||
{
|
||||
_cursor.gameObject.SetActive(!isRecording);
|
||||
_cursor.gameObject.SetActive(_cursorVisible);
|
||||
}
|
||||
|
||||
if (isRecording)
|
||||
{
|
||||
Cursor.visible = false;
|
||||
}
|
||||
Cursor.visible = false;
|
||||
}
|
||||
|
||||
private void InitCursor()
|
||||
|
||||
Reference in New Issue
Block a user