剧情+对话完善
This commit is contained in:
@@ -10,6 +10,10 @@ namespace Ichni.Menu
|
||||
public Button backButton;
|
||||
public SettingsWindowController settingsWindowController;
|
||||
public OffsetEditor offsetEditor;
|
||||
|
||||
// 设置页不再假定只能从章节选择页进入。该引用只保存本次打开设置时的来源,
|
||||
// 不需要写入存档;关闭设置页后即清空。
|
||||
private UIPageBase _returnPage;
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
@@ -19,8 +23,20 @@ namespace Ichni.Menu
|
||||
{
|
||||
FadeOut();
|
||||
SettingsManager.instance.SaveGameSettings();
|
||||
MenuManager.instance.chapterSelectionUIPage.FadeIn();
|
||||
(_returnPage ?? MenuManager.instance.chapterSelectionUIPage)?.FadeIn();
|
||||
_returnPage = null;
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 由独立的 <see cref="SettingsButton"/> 调用,记录打开设置页的来源并切换页面。
|
||||
/// 这样章节选择页、剧情页及未来其它页面都可复用同一个设置按钮逻辑。
|
||||
/// </summary>
|
||||
public void OpenFrom(UIPageBase sourcePage)
|
||||
{
|
||||
_returnPage = sourcePage;
|
||||
sourcePage?.FadeOut();
|
||||
FadeIn();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user