Browse Source

Shortcuts like Save File, Close File, Run, Build, now works

rsredsq 10 years ago
parent
commit
af6f033191
1 changed files with 11 additions and 4 deletions
  1. 11 4
      Script/AtomicEditor/ui/Shortcuts.ts

+ 11 - 4
Script/AtomicEditor/ui/Shortcuts.ts

@@ -54,9 +54,8 @@ class Shortcuts extends Atomic.ScriptObject {
 
     // global shortcut handler
     handleUIShortcut(ev: Atomic.UIShortcutEvent) {
-
-        // global shortcuts without qualifiers
-        if (!ev.qualifiers) {
+        // global shortcuts with qualifiers
+        if (ev.qualifiers == Atomic.QUAL_CTRL) {
 
             if (ev.key == Atomic.KEY_S) {
                 this.invokeFileSave();
@@ -67,13 +66,21 @@ class Shortcuts extends Atomic.ScriptObject {
             else if (ev.key == Atomic.KEY_I) {
                 this.invokeFormatCode();
             }
-
             else if (ev.key == Atomic.KEY_P) {
                 this.invokePlay();
             }
+            else if (ev.key == Atomic.KEY_B) {
+                EditorUI.getModelOps().showBuild();
+            }
 
         }
 
+        if (ev.qualifiers == (Atomic.QUAL_CTRL | Atomic.QUAL_SHIFT)) {
+            if (ev.key == Atomic.KEY_B) {
+                EditorUI.getModelOps().showBuildSettings();
+            }
+        }
+
     }
 
 }