Address some PR feedback
- Use AZ::IConsole instead of deprecated Cry IConsole. - Create fullscreen preview widget on the same screen where the main window is found, instead of on the 'primary' screen - Remove "ed_previewGameInFullscreen", which had the effect of always doing a full screen preview. If this functionality is desired, it should be re-added as a registry key instead of a cvar
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
|
||||
#include <AzCore/StringFunc/StringFunc.h>
|
||||
#include <AzCore/Utils/Utils.h>
|
||||
#include <AzCore/Console/IConsole.h>
|
||||
|
||||
// AzFramework
|
||||
#include <AzFramework/API/ApplicationAPI.h>
|
||||
@@ -926,6 +927,8 @@ void SEditorSettings::Load()
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
AZ_CVAR(bool, ed_previewGameInFullscreen_once, false, nullptr, AZ::ConsoleFunctorFlags::IsInvisible, "Preview the game (Ctrl+G, \"Play Game\", etc.) in fullscreen once");
|
||||
|
||||
void SEditorSettings::PostInitApply()
|
||||
{
|
||||
if (!gEnv || !gEnv->pConsole)
|
||||
@@ -947,12 +950,6 @@ void SEditorSettings::PostInitApply()
|
||||
REGISTER_CVAR2_CB("ed_keepEditorActive", &keepEditorActive, 0, VF_NULL, "Keep the editor active, even if no focus is set", KeepEditorActiveChanged);
|
||||
REGISTER_CVAR2("g_TemporaryLevelName", &g_TemporaryLevelName, "temp_level", VF_NULL, "Temporary level named used for experimental levels.");
|
||||
|
||||
REGISTER_INT("ed_previewGameInFullscreen", 0, VF_DEV_ONLY, "Preview the game (Ctrl+G, \"Play Game\", etc.) in fullscreen. 0 = no, 1 = yes");
|
||||
gEnv->pConsole->GetCVar("ed_previewGameInFullscreen")->SetLimits(0, 1);
|
||||
|
||||
REGISTER_INT("ed_previewGameInFullscreen_once", 0, VF_DEV_ONLY | VF_INVISIBLE, "Preview the game (Ctrl+G, \"Play Game\", etc.) in fullscreen once. 0 = no, 1 = yes");
|
||||
gEnv->pConsole->GetCVar("ed_previewGameInFullscreen_once")->SetLimits(0, 1);
|
||||
|
||||
CCryEditApp::instance()->KeepEditorActive(keepEditorActive > 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user