|
@@ -1,5 +1,6 @@
|
|
|
|
|
|
|
|
import EditorEvents = require("../editor/EditorEvents");
|
|
import EditorEvents = require("../editor/EditorEvents");
|
|
|
|
|
+import EditorUI = require("./EditorUI");
|
|
|
import ScriptWidget = require("./ScriptWidget");
|
|
import ScriptWidget = require("./ScriptWidget");
|
|
|
|
|
|
|
|
class WelcomeFrame extends ScriptWidget {
|
|
class WelcomeFrame extends ScriptWidget {
|
|
@@ -16,7 +17,7 @@ class WelcomeFrame extends ScriptWidget {
|
|
|
|
|
|
|
|
this.subscribeToEvent("ProjectLoaded", (data) => {
|
|
this.subscribeToEvent("ProjectLoaded", (data) => {
|
|
|
|
|
|
|
|
- Editor.getPreferences().registerRecentProject(data.ProjectPath);
|
|
|
|
|
|
|
+ Editor.getPreferences().registerRecentProject(data.ProjectPath);
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -48,6 +49,27 @@ class WelcomeFrame extends ScriptWidget {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if (id == "open project") {
|
|
|
|
|
+
|
|
|
|
|
+ var utils = new Editor.FileUtils();
|
|
|
|
|
+ var path = utils.openProjectFileDialog();
|
|
|
|
|
+ if (path) {
|
|
|
|
|
+
|
|
|
|
|
+ this.sendEvent(EditorEvents.LoadProject, { path: path });
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (id == "new project") {
|
|
|
|
|
+
|
|
|
|
|
+ var mo = EditorUI.getModelOps();
|
|
|
|
|
+ mo.showNewProject();
|
|
|
|
|
+ return true;
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|