Text changed and default behaviour changed

Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
This commit is contained in:
John Jones-Steele
2021-07-12 12:19:01 +01:00
parent 1d022907dc
commit c7d1117ebf
2 changed files with 15 additions and 3 deletions
+8 -2
View File
@@ -2970,7 +2970,12 @@ void EditorViewportWidget::RestoreViewportAfterGameMode()
{
Matrix34 preGameModeViewTM = m_preGameModeViewTM;
QString text = QString("You are exiting Game Mode. Would you like to restore the camera in the viewport to where it was before you entered Game Mode?<br/><br/><small>This option can always be changed in the General Preferences tab of the Editor Settings, by toggling the \"%1\" option.</small><br/><br/>").arg(EditorPreferencesGeneralRestoreViewportCameraSettingName);
QString text =
QString(
"When leaving \" Game Mode \" the engine will automatically restore your camera position to the default position before you "
"had entered Game mode.<br/><br/><small>If you dislike this setting you can always change this anytime in the global "
"preferences.</small><br/><br/>")
.arg(EditorPreferencesGeneralRestoreViewportCameraSettingName);
QString restoreOnExitGameModePopupDisabledRegKey("Editor/AutoHide/ViewportCameraRestoreOnExitGameMode");
// Read the popup disabled registry value
@@ -2978,13 +2983,14 @@ void EditorViewportWidget::RestoreViewportAfterGameMode()
QVariant restoreOnExitGameModePopupDisabledRegValue = settings.value(restoreOnExitGameModePopupDisabledRegKey);
// Has the user previously disabled being asked about restoring the camera on exiting game mode?
if (restoreOnExitGameModePopupDisabledRegValue.isNull())
//if (restoreOnExitGameModePopupDisabledRegValue.isNull())
{
// No, ask them now
QMessageBox messageBox(QMessageBox::Question, "O3DE", text, QMessageBox::StandardButtons(QMessageBox::No | QMessageBox::Yes), this);
messageBox.setDefaultButton(QMessageBox::Yes);
QCheckBox* checkBox = new QCheckBox(QStringLiteral("Do not show this message again"));
checkBox->setChecked(true);
messageBox.setCheckBox(checkBox);
// Unconstrain the system cursor and make it visible before we show the dialog box, otherwise the user can't see the cursor.
+7 -1
View File
@@ -4083,7 +4083,12 @@ void CRenderViewport::RestoreViewportAfterGameMode()
{
Matrix34 preGameModeViewTM = m_preGameModeViewTM;
QString text = QString("You are exiting Game Mode. Would you like to restore the camera in the viewport to where it was before you entered Game Mode?<br/><br/><small>This option can always be changed in the General Preferences tab of the Editor Settings, by toggling the \"%1\" option.</small><br/><br/>").arg(EditorPreferencesGeneralRestoreViewportCameraSettingName);
QString text =
QString(
"When leaving \" Game Mode \" the engine will automatically restore your camera position to the default position before you "
"had entered Game mode.<br/><br/><small>If you dislike this setting you can always change this anytime in the global "
"preferences.</small><br/><br/>")
.arg(EditorPreferencesGeneralRestoreViewportCameraSettingName);
QString restoreOnExitGameModePopupDisabledRegKey("Editor/AutoHide/ViewportCameraRestoreOnExitGameMode");
// Read the popup disabled registry value
@@ -4098,6 +4103,7 @@ void CRenderViewport::RestoreViewportAfterGameMode()
messageBox.setDefaultButton(QMessageBox::Yes);
QCheckBox* checkBox = new QCheckBox(QStringLiteral("Do not show this message again"));
checkBox->setChecked(true);
messageBox.setCheckBox(checkBox);
// Unconstrain the system cursor and make it visible before we show the dialog box, otherwise the user can't see the cursor.