LYN-4946 | Merge Game Mode buttons in the Play Controls toolbar (#5557)

* LYN-4946 Double play buttons - Tranformer style into one.

Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com>

* compile fix

Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com>

* Changes as per review.

Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com>

* Address minor confusion points.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Fix rename operation missing some matches...

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Remove extra newline.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

Co-authored-by: sphrose <82213493+sphrose@users.noreply.github.com>
This commit is contained in:
Danilo Aimini
2021-11-11 17:36:12 -08:00
committed by GitHub
parent 2fa3c134e0
commit a544800536
6 changed files with 62 additions and 17 deletions
+11 -9
View File
@@ -939,27 +939,27 @@ void MainWindow::InitActions()
.Connect(&QAction::triggered, this, &MainWindow::OnRefreshAudioSystem);
// Game actions
am->AddAction(ID_VIEW_SWITCHTOGAME, tr("Play &Game"))
am->AddAction(ID_VIEW_SWITCHTOGAME, tr("Play Game"))
.SetIcon(QIcon(":/stylesheet/img/UI20/toolbar/Play.svg"))
.SetToolTip(tr("Play Game"))
.SetStatusTip(tr("Activate the game input mode"))
.SetCheckable(true)
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdatePlayGame);
am->AddAction(ID_VIEW_SWITCHTOGAME_VIEWPORT, tr("Play Game"))
.SetShortcut(tr("Ctrl+G"))
.SetToolTip(tr("Play Game (Ctrl+G)"))
.SetStatusTip(tr("Activate the game input mode"))
.SetApplyHoverEffect()
.SetCheckable(true)
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdatePlayGame);
am->AddAction(ID_VIEW_SWITCHTOGAME_FULLSCREEN, tr("Play &Game (Maximized)"))
am->AddAction(ID_VIEW_SWITCHTOGAME_FULLSCREEN, tr("Play Game (Maximized)"))
.SetShortcut(tr("Ctrl+Shift+G"))
.SetStatusTip(tr("Activate the game input mode (maximized)"))
.SetIcon(Style::icon("Play"))
.SetApplyHoverEffect()
.SetCheckable(true);
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdatePlayGame);
am->AddAction(ID_TOOLBAR_WIDGET_PLAYCONSOLE_LABEL, tr("Play Controls"))
.SetText(tr("Play Controls"));
am->AddAction(ID_SWITCH_PHYSICS, tr("Simulate"))
.SetIcon(QIcon(":/stylesheet/img/UI20/toolbar/Simulate_Physics.svg"))
.SetShortcut(tr("Ctrl+P"))
.SetToolTip(tr("Simulate (Ctrl+P)"))
.SetCheckable(true)
.SetStatusTip(tr("Enable processing of Physics and AI."))
.SetApplyHoverEffect()
.SetCheckable(true)
@@ -1266,7 +1266,9 @@ void MainWindow::OnGameModeChanged(bool inGameMode)
// block signals on the switch to game actions before setting the checked state, as
// setting the checked state triggers the action, which will re-enter this function
// and result in an infinite loop
AZStd::vector<QAction*> actions = { m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME), m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME_FULLSCREEN) };
AZStd::vector<QAction*> actions = { m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME_VIEWPORT),
m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME_FULLSCREEN),
m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME)};
for (auto action : actions)
{
action->blockSignals(true);