Script Canvas: Added take screenshot button to toolbar

Signed-off-by: lsemp3d <58790905+lsemp3d@users.noreply.github.com>
This commit is contained in:
lsemp3d
2022-01-27 15:45:33 -08:00
parent 8ecaaf36c0
commit 1a8fdd9c84
4 changed files with 18 additions and 1 deletions
@@ -513,7 +513,6 @@ namespace ScriptCanvasEditor
m_editorToolbar->AddCustomAction(m_createFunctionOutput);
connect(m_createFunctionOutput, &QToolButton::clicked, this, &MainWindow::CreateFunctionOutput);
{
m_validateGraphToolButton = new QToolButton();
m_validateGraphToolButton->setToolTip("Will run a validation check on the current graph and report any warnings/errors discovered.");
@@ -523,6 +522,18 @@ namespace ScriptCanvasEditor
m_editorToolbar->AddCustomAction(m_validateGraphToolButton);
// Screenshot
{
m_takeScreenshot = new QToolButton();
m_takeScreenshot->setToolTip("Captures a full resolution screenshot of the entire graph or selected nodes into the clipboard");
m_takeScreenshot->setIcon(QIcon(":/ScriptCanvasEditorResources/Resources/scriptcanvas_screenshot.png"));
m_takeScreenshot->setEnabled(false);
}
m_editorToolbar->AddCustomAction(m_takeScreenshot);
connect(m_takeScreenshot, &QToolButton::clicked, this, &MainWindow::OnScreenshot);
connect(m_validateGraphToolButton, &QToolButton::clicked, this, &MainWindow::OnValidateCurrentGraph);
m_layout->addWidget(m_editorToolbar);
@@ -3211,6 +3222,7 @@ namespace ScriptCanvasEditor
m_createFunctionOutput->setEnabled(enabled);
m_createFunctionInput->setEnabled(enabled);
m_takeScreenshot->setEnabled(enabled);
// File Menu
ui->action_Close->setEnabled(enabled);