Full screen game preview for Atom viewport
This commit is contained in:
@@ -949,6 +949,12 @@ void MainWindow::InitActions()
|
||||
.SetApplyHoverEffect()
|
||||
.SetCheckable(true)
|
||||
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdatePlayGame);
|
||||
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);
|
||||
am->AddAction(ID_TOOLBAR_WIDGET_PLAYCONSOLE_LABEL, tr("Play Controls"))
|
||||
.SetText(tr("Play Controls"));
|
||||
am->AddAction(ID_SWITCH_PHYSICS, tr("Simulate"))
|
||||
@@ -1266,10 +1272,12 @@ void MainWindow::OnGameModeChanged(bool inGameMode)
|
||||
{
|
||||
menuBar()->setDisabled(inGameMode);
|
||||
m_toolbarManager->SetEnabled(!inGameMode);
|
||||
QAction* action = m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME);
|
||||
action->blockSignals(true); // avoid a loop
|
||||
action->setChecked(inGameMode);
|
||||
action->blockSignals(false);
|
||||
|
||||
// avoid a loop
|
||||
AZStd::vector<QAction*> actions = { m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME), m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME_FULLSCREEN) };
|
||||
for (auto action : actions) action->blockSignals(true);
|
||||
for (auto action : actions) action->setChecked(inGameMode);
|
||||
for (auto action : actions) action->blockSignals(false);
|
||||
}
|
||||
|
||||
void MainWindow::OnEditorNotifyEvent(EEditorNotifyEvent ev)
|
||||
|
||||
Reference in New Issue
Block a user