From 2558801a247498bb0ed05b7ebaf26d9ccd98a7f0 Mon Sep 17 00:00:00 2001 From: jjjoness <82226755+jjjoness@users.noreply.github.com> Date: Wed, 12 May 2021 08:58:16 +0100 Subject: [PATCH 1/2] Commit before merging main --- Code/Sandbox/Editor/MainWindow.cpp | 4 ++-- Code/Sandbox/Editor/ToolbarManager.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Code/Sandbox/Editor/MainWindow.cpp b/Code/Sandbox/Editor/MainWindow.cpp index 5abb780bac..5538df1424 100644 --- a/Code/Sandbox/Editor/MainWindow.cpp +++ b/Code/Sandbox/Editor/MainWindow.cpp @@ -1064,8 +1064,8 @@ void MainWindow::InitActions() .SetApplyHoverEffect() .SetCheckable(true) .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdatePlayGame); - am->AddAction(ID_TOOLBAR_WIDGET_PLAYCONSOLE_LABEL, tr("Play Console")) - .SetText(tr("Play Console")); + am->AddAction(ID_TOOLBAR_WIDGET_PLAYCONSOLE_LABEL, tr("Play Controls")) + .SetText(tr("Play Controls")); am->AddAction(ID_SWITCH_PHYSICS, tr("Simulate")) .SetShortcut(tr("Ctrl+P")) .SetToolTip(tr("Simulate (Ctrl+P)")) diff --git a/Code/Sandbox/Editor/ToolbarManager.cpp b/Code/Sandbox/Editor/ToolbarManager.cpp index bbb3ef6790..76fbe92fa8 100644 --- a/Code/Sandbox/Editor/ToolbarManager.cpp +++ b/Code/Sandbox/Editor/ToolbarManager.cpp @@ -613,7 +613,7 @@ AmazonToolbar ToolbarManager::GetObjectToolbar() const AmazonToolbar ToolbarManager::GetPlayConsoleToolbar() const { - AmazonToolbar t = AmazonToolbar("PlayConsole", QObject::tr("Play Console")); + AmazonToolbar t = AmazonToolbar("PlayConsole", QObject::tr("Play Controls")); t.SetMainToolbar(true); t.AddAction(ID_TOOLBAR_WIDGET_SPACER_RIGHT, ORIGINAL_TOOLBAR_VERSION); From 552ebea1350898594de79471e6b683bf51bfbbf1 Mon Sep 17 00:00:00 2001 From: jjjoness <82226755+jjjoness@users.noreply.github.com> Date: Wed, 12 May 2021 11:40:36 +0100 Subject: [PATCH 2/2] Added Simulate button --- .../img/UI20/toolbar/Simulate_Physics.svg | 24 +++++++++++++++++++ .../AzQtComponents/Components/resources.qrc | 1 + Code/Sandbox/Editor/MainWindow.cpp | 3 +++ Code/Sandbox/Editor/ToolbarManager.cpp | 2 ++ 4 files changed, 30 insertions(+) create mode 100644 Code/Framework/AzQtComponents/AzQtComponents/Components/img/UI20/toolbar/Simulate_Physics.svg diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/img/UI20/toolbar/Simulate_Physics.svg b/Code/Framework/AzQtComponents/AzQtComponents/Components/img/UI20/toolbar/Simulate_Physics.svg new file mode 100644 index 0000000000..0839be31b1 --- /dev/null +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/img/UI20/toolbar/Simulate_Physics.svg @@ -0,0 +1,24 @@ + + + Icon / Toolbar / Play Console / Simulate Physics + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/resources.qrc b/Code/Framework/AzQtComponents/AzQtComponents/Components/resources.qrc index 1e8ddb43e0..b995874a41 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/resources.qrc +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/resources.qrc @@ -372,6 +372,7 @@ img/UI20/toolbar/Select.svg img/UI20/toolbar/select_object.svg img/UI20/toolbar/Select_terrain.svg + img/UI20/toolbar/Simulate_Physics.svg img/UI20/toolbar/Simulate_Physics_on_selected_objects.svg img/UI20/toolbar/Terrain.svg img/UI20/toolbar/Terrain_Texture.svg diff --git a/Code/Sandbox/Editor/MainWindow.cpp b/Code/Sandbox/Editor/MainWindow.cpp index c02b64f8b7..b6aece28e3 100644 --- a/Code/Sandbox/Editor/MainWindow.cpp +++ b/Code/Sandbox/Editor/MainWindow.cpp @@ -1023,10 +1023,13 @@ void MainWindow::InitActions() 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) .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnSwitchPhysicsUpdate); am->AddAction(ID_GAME_SYNCPLAYER, tr("Move Player and Camera Separately")).SetCheckable(true) .SetStatusTip(tr("Move Player and Camera Separately")) diff --git a/Code/Sandbox/Editor/ToolbarManager.cpp b/Code/Sandbox/Editor/ToolbarManager.cpp index 7d7ac5112b..391eabae33 100644 --- a/Code/Sandbox/Editor/ToolbarManager.cpp +++ b/Code/Sandbox/Editor/ToolbarManager.cpp @@ -616,6 +616,8 @@ AmazonToolbar ToolbarManager::GetPlayConsoleToolbar() const t.AddAction(ID_TOOLBAR_SEPARATOR, ORIGINAL_TOOLBAR_VERSION); t.AddAction(ID_TOOLBAR_WIDGET_PLAYCONSOLE_LABEL, ORIGINAL_TOOLBAR_VERSION); t.AddAction(ID_VIEW_SWITCHTOGAME, TOOLBARS_WITH_PLAY_GAME); + t.AddAction(ID_TOOLBAR_SEPARATOR, ORIGINAL_TOOLBAR_VERSION); + t.AddAction(ID_SWITCH_PHYSICS, TOOLBARS_WITH_PLAY_GAME); return t; }