|
@@ -1,14 +1,30 @@
|
|
|
//
|
|
//
|
|
|
-// Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
|
|
|
|
|
-// LICENSE: Atomic Game Engine Editor and Tools EULA
|
|
|
|
|
-// Please see LICENSE_ATOMIC_EDITOR_AND_TOOLS.md in repository root for
|
|
|
|
|
-// license information: https://github.com/AtomicGameEngine/AtomicGameEngine
|
|
|
|
|
|
|
+// Copyright (c) 2014-2016 THUNDERBEAST GAMES LLC
|
|
|
|
|
+//
|
|
|
|
|
+// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
|
+// of this software and associated documentation files (the "Software"), to deal
|
|
|
|
|
+// in the Software without restriction, including without limitation the rights
|
|
|
|
|
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
|
+// copies of the Software, and to permit persons to whom the Software is
|
|
|
|
|
+// furnished to do so, subject to the following conditions:
|
|
|
|
|
+//
|
|
|
|
|
+// The above copyright notice and this permission notice shall be included in
|
|
|
|
|
+// all copies or substantial portions of the Software.
|
|
|
|
|
+//
|
|
|
|
|
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
|
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
|
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
|
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
|
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
|
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
|
+// THE SOFTWARE.
|
|
|
//
|
|
//
|
|
|
|
|
|
|
|
import strings = require("../../EditorStrings");
|
|
import strings = require("../../EditorStrings");
|
|
|
import EditorEvents = require("../../../editor/EditorEvents");
|
|
import EditorEvents = require("../../../editor/EditorEvents");
|
|
|
import EditorUI = require("../../EditorUI");
|
|
import EditorUI = require("../../EditorUI");
|
|
|
import MenuItemSources = require("./MenuItemSources");
|
|
import MenuItemSources = require("./MenuItemSources");
|
|
|
|
|
+import Preferences = require("editor/Preferences");
|
|
|
|
|
|
|
|
class MainFrameMenu extends Atomic.ScriptObject {
|
|
class MainFrameMenu extends Atomic.ScriptObject {
|
|
|
|
|
|
|
@@ -211,6 +227,14 @@ class MainFrameMenu extends Atomic.ScriptObject {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //Sets all value in prefs.json to default and shuts down the editor.
|
|
|
|
|
+ if (refid == "developer clear preferences") {
|
|
|
|
|
+ var myPrefs = Preferences.getInstance();
|
|
|
|
|
+ myPrefs.useDefaultConfig();
|
|
|
|
|
+ myPrefs.saveEditorWindowData(myPrefs.editorWindow);
|
|
|
|
|
+ myPrefs.savePlayerWindowData(myPrefs.playerWindow);
|
|
|
|
|
+ Atomic.getEngine().exit();
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
} else if (target.id == "menu tools popup") {
|
|
} else if (target.id == "menu tools popup") {
|
|
|
|
|
|
|
@@ -249,6 +273,10 @@ class MainFrameMenu extends Atomic.ScriptObject {
|
|
|
} else if (refid == "help chat") {
|
|
} else if (refid == "help chat") {
|
|
|
Atomic.fileSystem.systemOpen("https://gitter.im/AtomicGameEngine/AtomicGameEngine/");
|
|
Atomic.fileSystem.systemOpen("https://gitter.im/AtomicGameEngine/AtomicGameEngine/");
|
|
|
return true;
|
|
return true;
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (refid == "help getting started") {
|
|
|
|
|
+ Atomic.fileSystem.systemOpen("http://atomicgameengine.com/learn/");
|
|
|
|
|
+ return true;
|
|
|
} else if (refid == "help github") {
|
|
} else if (refid == "help github") {
|
|
|
Atomic.fileSystem.systemOpen("https://github.com/AtomicGameEngine/AtomicGameEngine/");
|
|
Atomic.fileSystem.systemOpen("https://github.com/AtomicGameEngine/AtomicGameEngine/");
|
|
|
return true;
|
|
return true;
|
|
@@ -312,6 +340,7 @@ var buildItems = {
|
|
|
var developerItems = {
|
|
var developerItems = {
|
|
|
|
|
|
|
|
"Show Console": ["developer show console"],
|
|
"Show Console": ["developer show console"],
|
|
|
|
|
+ "Clear Preferences": ["developer clear preferences"], //Adds clear preference to developer menu items list
|
|
|
"Debug": {
|
|
"Debug": {
|
|
|
"UI Debugger": ["developer show uidebugger"],
|
|
"UI Debugger": ["developer show uidebugger"],
|
|
|
"Asset Database": {
|
|
"Asset Database": {
|
|
@@ -340,14 +369,12 @@ var fileItems = {
|
|
|
|
|
|
|
|
var helpItems = {
|
|
var helpItems = {
|
|
|
|
|
|
|
|
- "Check for Updates": "check update",
|
|
|
|
|
|
|
+ "Getting Started": "help getting started",
|
|
|
"API Documentation": ["help api"],
|
|
"API Documentation": ["help api"],
|
|
|
"-1": null,
|
|
"-1": null,
|
|
|
"Atomic Chat": ["help chat"],
|
|
"Atomic Chat": ["help chat"],
|
|
|
"Atomic Forums": ["help forums"],
|
|
"Atomic Forums": ["help forums"],
|
|
|
"-2": null,
|
|
"-2": null,
|
|
|
"Atomic Game Engine on GitHub": ["help github"],
|
|
"Atomic Game Engine on GitHub": ["help github"],
|
|
|
- "About Atomic Editor": "about atomic editor",
|
|
|
|
|
- "-3": null,
|
|
|
|
|
- "Manage License": "manage license"
|
|
|
|
|
|
|
+ "About Atomic Editor": "about atomic editor"
|
|
|
};
|
|
};
|