Browse Source

Editor deselect all

Chris Friesen 11 năm trước cách đây
mục cha
commit
262bb942e4

+ 2 - 1
Docs/GettingStarted.dox

@@ -657,7 +657,8 @@ Ctrl+Shift+N       - New scene
 Ctrl+O             - Open scene
 Ctrl+S             - Save scene
 Ctrl+Shift+S       - Save scene as
-Ctrl+A             - Select/deselect all root level nodes
+Ctrl+A             - Select all root level nodes
+Ctrl+Shift+A       - Deselect all nodes
 Ctrl+X,C,V         - Cut/copy/paste node or component
 Ctrl+D             - Duplicate node or component
 Ctrl+E             - Enable/disable node hierarchy or component

+ 12 - 0
bin/Data/Scripts/Editor/EditorHierarchyWindow.as

@@ -1560,6 +1560,18 @@ bool SelectAll()
     return false;
 }
 
+bool DeselectAll()
+{
+    if (CheckHierarchyWindowFocus())
+    {
+        BeginSelectionModify();
+        hierarchyList.ClearSelection();
+        EndSelectionModify();
+        return true;
+    }
+    return false;
+}
+
 bool ResetToDefault()
 {
     if (CheckHierarchyWindowFocus())

+ 1 - 0
bin/Data/Scripts/Editor/EditorUI.as

@@ -327,6 +327,7 @@ void CreateMenuBar()
         popup.AddChild(CreateMenuItem("Paste", @Paste, 'V', QUAL_CTRL));
         popup.AddChild(CreateMenuItem("Delete", @Delete, KEY_DELETE, QUAL_ANY));
         popup.AddChild(CreateMenuItem("Select all", @SelectAll, 'A', QUAL_CTRL));
+        popup.AddChild(CreateMenuItem("Deselect all", @DeselectAll, 'A', QUAL_SHIFT | QUAL_CTRL));
         CreateChildDivider(popup);
         popup.AddChild(CreateMenuItem("Reset to default", @ResetToDefault));
         CreateChildDivider(popup);