|
@@ -197,7 +197,7 @@ class HierarchyFrame extends Atomic.UIWidget {
|
|
|
|
|
|
|
|
if (data.type == Atomic.UI_EVENT_TYPE_KEY_UP) {
|
|
if (data.type == Atomic.UI_EVENT_TYPE_KEY_UP) {
|
|
|
|
|
|
|
|
- if (data.key == Atomic.KEY_DOWN || data.key == Atomic.KEY_UP) {
|
|
|
|
|
|
|
+ if (data.key == Atomic.KEY_DOWN || data.key == Atomic.KEY_UP || data.key == Atomic.KEY_LEFT || data.key == Atomic.KEY_RIGHT) {
|
|
|
var selectedId = Number(this.hierList.selectedItemID);
|
|
var selectedId = Number(this.hierList.selectedItemID);
|
|
|
var node = this.scene.getNode(selectedId);
|
|
var node = this.scene.getNode(selectedId);
|
|
|
|
|
|
|
@@ -207,6 +207,34 @@ class HierarchyFrame extends Atomic.UIWidget {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ if (data.key == Atomic.KEY_RIGHT) {
|
|
|
|
|
+ var selectedId = Number(this.hierList.selectedItemID);
|
|
|
|
|
+ var itemNodeId = this.nodeIDToItemID[selectedId];
|
|
|
|
|
+
|
|
|
|
|
+ if (!this.hierList.getExpanded(itemNodeId) && this.hierList.getExpandable(itemNodeId)) {
|
|
|
|
|
+ this.hierList.setExpanded(itemNodeId, true);
|
|
|
|
|
+ this.hierList.rootList.invalidateList();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.hierList.rootList.selectNextItem();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ } else if (data.key == Atomic.KEY_LEFT) {
|
|
|
|
|
+ var selectedId = Number(this.hierList.selectedItemID);
|
|
|
|
|
+ var itemNodeId = this.nodeIDToItemID[selectedId];
|
|
|
|
|
+
|
|
|
|
|
+ if (this.hierList.getExpanded(itemNodeId)) {
|
|
|
|
|
+ this.hierList.setExpanded(itemNodeId, false);
|
|
|
|
|
+ this.hierList.rootList.invalidateList();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ var node = this.scene.getNode(selectedId);
|
|
|
|
|
+ var parentNode = node.getParent();
|
|
|
|
|
+ if (parentNode) {
|
|
|
|
|
+ this.hierList.selectItemByID(parentNode.id.toString());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// node deletion
|
|
// node deletion
|
|
|
if (data.key == Atomic.KEY_DELETE || data.key == Atomic.KEY_BACKSPACE) {
|
|
if (data.key == Atomic.KEY_DELETE || data.key == Atomic.KEY_BACKSPACE) {
|
|
|
|
|
|