新增 RecordingToolPanel,按 Ctrl+R 唤出侧边栏,可独立控制光标、 版本号、Top Bar 与对话视觉的显隐。移除旧的 UIEventEnum.RecordingModeChanged 事件,改为各子系统提供显式 SetVisible API。在 Persistence 场景中配置面板层级与四个开关。
102 lines
1.9 KiB
C#
102 lines
1.9 KiB
C#
using System.Text.RegularExpressions;
|
|
using AibisDream.Kit;
|
|
using AibisDream.Utility;
|
|
using Yarn.Unity;
|
|
|
|
namespace AibisDream
|
|
{
|
|
public enum EventEnum
|
|
{
|
|
NextYarn,
|
|
PlugIn,
|
|
PlugOut,
|
|
SceneLoad,
|
|
FixSceneModeChanged,
|
|
CutEnd
|
|
}
|
|
|
|
public enum GameLoopEnum
|
|
{
|
|
AppStart,
|
|
GameStart,
|
|
GameQuit,
|
|
PauseGame,
|
|
UnPauseGame,
|
|
ScreenResolutionChanged
|
|
}
|
|
|
|
public enum DialogEventEnum
|
|
{
|
|
StartNode,
|
|
|
|
LineStart,
|
|
LineShown,
|
|
LineEnd,
|
|
OptionShow,
|
|
OptionSelected
|
|
}
|
|
|
|
public enum InteractionEventEnum
|
|
{
|
|
DialogStart,
|
|
DialogEnd
|
|
}
|
|
|
|
public enum ScreenEventEnum
|
|
{
|
|
RegisterLineView,
|
|
|
|
Selected
|
|
}
|
|
|
|
public struct DialogText
|
|
{
|
|
public bool isOption;
|
|
public string line;
|
|
public CharacterVo actor;
|
|
public string lineId;
|
|
|
|
public static DialogText GetLine(LocalizedLine dialogueLine)
|
|
{
|
|
return new DialogText
|
|
{
|
|
isOption = false,
|
|
line = dialogueLine.TextWithoutCharacterName.Text,
|
|
lineId = dialogueLine.TextID,
|
|
actor = dialogueLine.GetCharacterVo()
|
|
};
|
|
}
|
|
|
|
public string GetRecordLine()
|
|
{
|
|
const string allowedTagsPattern = @"(<|{)(?!\/?(b|i|color)(?=>|\s|=))[^(>|})]+(>|})";
|
|
var res = Regex.Replace(line, allowedTagsPattern, "");
|
|
return res;
|
|
}
|
|
}
|
|
|
|
public enum StorageEvent
|
|
{
|
|
VariableSet
|
|
}
|
|
|
|
public enum SettingChangeEvent
|
|
{
|
|
TextSpeed,
|
|
LocaleChanged
|
|
}
|
|
|
|
public enum TerminalUIAudioEnum
|
|
{
|
|
Hover,
|
|
Click,
|
|
}
|
|
|
|
public enum TerminalUIEvent
|
|
{
|
|
MainMenuPhase,
|
|
PauseMenuAmbEnter,
|
|
PauseMenuAmbExit,
|
|
}
|
|
}
|