/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/Editor/EditorFramework/EditorApp/UserMessaging.cpp
62 строки
2 KB
Jan Krassnigg
Improved tag UI, data dir dialog, data fix (#1980)
09 июл 2026, 07:26
Не верифицирован
09 июл 2026, 07:26
f4412ca
Код
Авторство
О чём код?
#include <EditorFramework/EditorFrameworkPCH.h> #include <EditorFramework/EditorApp/EditorApp.moc.h> void ezQtEditorApp::AddRestartRequiredReason(const char* szReason) { if (!m_RestartRequiredReasons.Find(szReason).IsValid()) { m_RestartRequiredReasons.Insert(szReason); UpdateGlobalStatusBarMessage(); } ezStringBuilder s; s.SetFormat("The editor process must be restarted.\nReason: '{0}'\n\nDo you want to restart now?", szReason); if (ezQtUiServices::MessageBoxQuestion(s, QMessageBox::StandardButton::Yes | QMessageBox::StandardButton::No, QMessageBox::StandardButton::Yes) == QMessageBox::StandardButton::Yes) { if (ezToolsProject::CanCloseProject()) { LaunchEditor(ezToolsProject::GetSingleton()->GetProjectFile(), false); QApplication::closeAllWindows(); return; } } } void ezQtEditorApp::AddReloadProjectRequiredReason(const char* szReason) { if (!m_ReloadProjectRequiredReasons.Find(szReason).IsValid()) { m_ReloadProjectRequiredReasons.Insert(szReason); UpdateGlobalStatusBarMessage(); } ezStringBuilder s; s.SetFormat("The project must be reloaded.\nReason: '{0}'\n\nDo you want to reload it now?", szReason); if (ezQtUiServices::MessageBoxQuestion(s, QMessageBox::StandardButton::Yes | QMessageBox::StandardButton::No, QMessageBox::StandardButton::Yes) == QMessageBox::StandardButton::Yes) { if (ezToolsProject::CanCloseProject()) { ezStringBuilder sProjectFile = ezToolsProject::GetSingleton()->GetProjectFile(); SlotQueuedCloseProject(); OpenProject(sProjectFile, true).IgnoreResult(); } } } void ezQtEditorApp::UpdateGlobalStatusBarMessage() { ezStringBuilder sText; if (!m_RestartRequiredReasons.IsEmpty()) sText.Append("Restart the editor to apply changes. "); if (!m_ReloadProjectRequiredReasons.IsEmpty()) sText.Append("Reload the project to apply changes. "); ezQtUiServices::ShowGlobalStatusBarMessage(sText); }