Adding a shortcut to hide clusters. (#1071)
Adding the shortcut "U" to hide the TransformModeSelection & SpaceSelection clusters from the viewport.
This commit is contained in:
+11
-1
@@ -2471,7 +2471,17 @@ namespace AzToolsFramework
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
AddAction(
|
||||
m_actions, { QKeySequence(Qt::Key_U) },
|
||||
/*ID_VIEWPORTUI_VISIBLE=*/50040, "Toggle ViewportUI", "Hide/Unhide Viewport UI",
|
||||
[this]()
|
||||
{
|
||||
SetViewportUiClusterVisible(m_transformModeClusterId, !m_viewportUiVisible);
|
||||
SetViewportUiClusterVisible(m_spaceCluster.m_spaceClusterId, !m_viewportUiVisible);
|
||||
m_viewportUiVisible = !m_viewportUiVisible;
|
||||
});
|
||||
|
||||
EditorMenuRequestBus::Broadcast(&EditorMenuRequests::RestoreEditMenuToDefault);
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -306,6 +306,7 @@ namespace AzToolsFramework
|
||||
AzFramework::ClickDetector m_clickDetector; //!< Detect different types of mouse click.
|
||||
AzFramework::CursorState m_cursorState; //!< Track the mouse position and delta movement each frame.
|
||||
SpaceCluster m_spaceCluster; //!< Related viewport ui state for controlling the current reference space.
|
||||
bool m_viewportUiVisible = true; //!< Used to hide/show the viewport ui elements.
|
||||
};
|
||||
|
||||
//! The ETCS (EntityTransformComponentSelection) namespace contains functions and data used exclusively by
|
||||
|
||||
@@ -369,3 +369,4 @@
|
||||
#define ID_TOOLBAR_WIDGET_SPACER_RIGHT 50013
|
||||
#define ID_TOOLBAR_WIDGET_PLAYCONSOLE_LABEL 50014
|
||||
#define ID_TOOLBAR_WIDGET_LAST 50020
|
||||
#define ID_VIEWPORTUI_VISIBLE 50040
|
||||
|
||||
Reference in New Issue
Block a user