@@ -169,5 +169,50 @@ namespace Ichni
|
||||
cameraManager.SetUpInspector();
|
||||
gridController.SetUpInspector();
|
||||
}
|
||||
|
||||
|
||||
private bool isQuit = false;
|
||||
[Obsolete]
|
||||
public void OnApplicationQuit()
|
||||
{
|
||||
if (isQuit) return;
|
||||
|
||||
Application.CancelQuit();//退出拦截
|
||||
GeneralSecondaryWindow QuitWindow =
|
||||
Instantiate(EditorManager.instance.basePrefabs.generalSecondaryWindow,
|
||||
EditorManager.instance.uiManager.mainPage.mainCanvas.GetComponent<RectTransform>()).GetComponent<GeneralSecondaryWindow>();
|
||||
|
||||
QuitWindow.Initialize("Do You Want To Save?", () =>
|
||||
{
|
||||
Destroy(QuitWindow.gameObject);
|
||||
});
|
||||
|
||||
|
||||
var container = QuitWindow.GenerateContainer("Save confirm");
|
||||
var beatmapToolsSettings = container.GenerateSubcontainer(3);
|
||||
var yesButton = QuitWindow.GenerateButton(beatmapToolsSettings, "Yes", () =>
|
||||
{
|
||||
isQuit = true;
|
||||
EditorManager.instance.projectManager.saveManager.Save();
|
||||
Application.Quit();
|
||||
|
||||
});
|
||||
var noButton = QuitWindow.GenerateButton(beatmapToolsSettings, "No", () =>
|
||||
{
|
||||
isQuit = true;
|
||||
Application.Quit();
|
||||
});
|
||||
|
||||
// if (isQuit)
|
||||
// {
|
||||
// Application.CancelQuit();//退出拦截
|
||||
// MessageCtrl.Instance.OpenConfirmView("关闭界面将终止,确认关闭?", "", () =>
|
||||
// {
|
||||
// isQuit = false;
|
||||
// Application.Quit();
|
||||
// });
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user