Browse Source

Merge branch 'master' into AlphabeticTSBindings

Matt Benic 9 years ago
parent
commit
17c2411797
100 changed files with 3651 additions and 1314 deletions
  1. 4 0
      AUTHORS.md
  2. 1 1
      Build/CIScripts/BuildWeb.js
  3. 63 6
      Build/CIScripts/GenEditorData.js
  4. 7 0
      Build/CMake/Modules/AtomicCommon.cmake
  5. 16 2
      Build/CMake/Modules/AtomicDesktop.cmake
  6. 21 19
      Build/CMake/Modules/AtomicWebView.cmake
  7. 6 1
      Build/CMake/Modules/AtomicWindows.cmake
  8. 2 2
      Build/CMake/Toolchains/emscripten.toolchain.cmake
  9. 11 0
      Build/Scripts/BuildCommon.js
  10. 8 0
      Build/Scripts/BuildLinux.js
  11. 75 0
      Build/Scripts/BuildWeb.js
  12. 1 0
      Build/Scripts/Host.js
  13. 220 170
      Build/node_modules/typescript/lib/tsc.js
  14. 277 168
      Build/node_modules/typescript/lib/tsserver.js
  15. 7 8
      Build/node_modules/typescript/lib/typescript.d.ts
  16. 276 171
      Build/node_modules/typescript/lib/typescript.js
  17. 7 8
      Build/node_modules/typescript/lib/typescriptServices.d.ts
  18. 276 171
      Build/node_modules/typescript/lib/typescriptServices.js
  19. 19 15
      Build/node_modules/typescript/package.json
  20. 3 3
      Build/npm-shrinkwrap.json
  21. 3 2
      Build/package.json
  22. 13 2
      CMakeLists.txt
  23. 1 1
      Data/AtomicEditor/CodeEditor/.gitignore
  24. 14 3
      Data/AtomicEditor/CodeEditor/Editor.html
  25. 3 0
      Data/AtomicEditor/CodeEditor/source/systemjs/system.js
  26. 2 0
      Data/AtomicEditor/Deployment/MacOS/AtomicPlayer.app/Contents/Info.plist
  27. 16 0
      Data/AtomicEditor/ProjectTemplates/Project2D/JavaScript/Resources/Components/Spinner.js
  28. 0 15
      Data/AtomicEditor/ProjectTemplates/Project2D/JavaScript/Resources/Components/Star.js
  29. 25 11
      Data/AtomicEditor/ProjectTemplates/Project2D/JavaScript/Resources/Scenes/Scene.scene
  30. 1 1
      Data/AtomicEditor/ProjectTemplates/Project3D/JavaScript/Resources/Scenes/Scene.scene
  31. 1 1
      Data/AtomicEditor/ProjectTemplates/Project3D/TypeScript/Resources/Scenes/Scene.scene
  32. 1 0
      Data/AtomicEditor/TypeScriptSupport/.gitignore
  33. 9 0
      Data/AtomicEditor/TypeScriptSupport/duktape.d.ts
  34. 43 7
      LICENSE.md
  35. 0 19
      Licenses/CONTRIBUTION_LICENSE.md
  36. 0 89
      Licenses/LICENSE_ATOMIC_EDITOR_AND_TOOLS.md
  37. 0 31
      Licenses/LICENSE_ATOMIC_RUNTIME.md
  38. 30 40
      README.md
  39. 1 6
      Resources/EditorData/AtomicEditor/editor/ui/about.tb.txt
  40. 1 6
      Resources/EditorData/AtomicEditor/editor/ui/eulaagreement.tb.txt
  41. 4 0
      Resources/EditorData/AtomicEditor/editor/ui/hierarchyframe.tb.txt
  42. 4 0
      Resources/EditorData/AtomicEditor/editor/ui/projectframe.tb.txt
  43. 3 0
      Resources/EditorData/AtomicEditor/editor/ui/resourceselection.tb.txt
  44. 0 73
      Resources/EditorData/AtomicEditor/eulas/atomic_game_engine_eula.txt
  45. 0 21
      Resources/EditorData/AtomicEditor/eulas/atomic_runtime_eula.txt
  46. 26 6
      Script/AtomicEditor/editor/Editor.ts
  47. 59 8
      Script/AtomicEditor/editor/EditorEvents.ts
  48. 19 4
      Script/AtomicEditor/editor/EditorLicense.ts
  49. 19 4
      Script/AtomicEditor/editor/Preferences.ts
  50. 372 0
      Script/AtomicEditor/hostExtensions/HostExtensionServices.ts
  51. 93 0
      Script/AtomicEditor/hostExtensions/ServiceLocator.ts
  52. 135 0
      Script/AtomicEditor/hostExtensions/coreExtensions/ProjectBasedExtensionLoader.ts
  53. 201 0
      Script/AtomicEditor/hostExtensions/languageExtensions/TypscriptLanguageExtension.ts
  54. 19 4
      Script/AtomicEditor/main.ts
  55. 22 0
      Script/AtomicEditor/resources/ProjectTemplates.ts
  56. 19 4
      Script/AtomicEditor/resources/ResourceOps.ts
  57. 61 0
      Script/AtomicEditor/resources/SearchBarFiltering.ts
  58. 19 4
      Script/AtomicEditor/ui/EditorStrings.ts
  59. 28 4
      Script/AtomicEditor/ui/EditorUI.ts
  60. 19 4
      Script/AtomicEditor/ui/MainToolbar.ts
  61. 19 4
      Script/AtomicEditor/ui/ScriptWidget.ts
  62. 19 4
      Script/AtomicEditor/ui/Shortcuts.ts
  63. 19 4
      Script/AtomicEditor/ui/UIEvents.ts
  64. 89 6
      Script/AtomicEditor/ui/frames/HierarchyFrame.ts
  65. 21 5
      Script/AtomicEditor/ui/frames/MainFrame.ts
  66. 79 15
      Script/AtomicEditor/ui/frames/ProjectFrame.ts
  67. 45 5
      Script/AtomicEditor/ui/frames/ResourceFrame.ts
  68. 19 4
      Script/AtomicEditor/ui/frames/WelcomeFrame.ts
  69. 19 4
      Script/AtomicEditor/ui/frames/inspector/ArrayEditWidget.ts
  70. 19 4
      Script/AtomicEditor/ui/frames/inspector/AssemblyInspector.ts
  71. 19 4
      Script/AtomicEditor/ui/frames/inspector/AttributeInfoEdit.ts
  72. 19 4
      Script/AtomicEditor/ui/frames/inspector/CSComponentClassSelector.ts
  73. 19 4
      Script/AtomicEditor/ui/frames/inspector/ComponentAttributeUI.ts
  74. 19 4
      Script/AtomicEditor/ui/frames/inspector/CreateComponentButton.ts
  75. 20 5
      Script/AtomicEditor/ui/frames/inspector/InspectorFrame.ts
  76. 19 4
      Script/AtomicEditor/ui/frames/inspector/InspectorUtils.ts
  77. 19 4
      Script/AtomicEditor/ui/frames/inspector/InspectorWidget.ts
  78. 24 9
      Script/AtomicEditor/ui/frames/inspector/MaterialInspector.ts
  79. 19 4
      Script/AtomicEditor/ui/frames/inspector/ModelInspector.ts
  80. 19 4
      Script/AtomicEditor/ui/frames/inspector/PrefabInspector.ts
  81. 19 4
      Script/AtomicEditor/ui/frames/inspector/SelectionEditTypes.ts
  82. 19 4
      Script/AtomicEditor/ui/frames/inspector/SelectionInspector.ts
  83. 19 4
      Script/AtomicEditor/ui/frames/inspector/SelectionPrefabWidget.ts
  84. 19 4
      Script/AtomicEditor/ui/frames/inspector/SelectionSection.ts
  85. 19 4
      Script/AtomicEditor/ui/frames/inspector/SelectionSectionCoreUI.ts
  86. 19 4
      Script/AtomicEditor/ui/frames/inspector/SelectionSectionUI.ts
  87. 19 4
      Script/AtomicEditor/ui/frames/inspector/SerializableEditType.ts
  88. 19 4
      Script/AtomicEditor/ui/frames/inspector/TextureSelector.ts
  89. 38 7
      Script/AtomicEditor/ui/frames/menus/HierarchyFrameMenu.ts
  90. 67 8
      Script/AtomicEditor/ui/frames/menus/MainFrameMenu.ts
  91. 36 10
      Script/AtomicEditor/ui/frames/menus/MenuItemSources.ts
  92. 34 6
      Script/AtomicEditor/ui/frames/menus/ProjectFrameMenu.ts
  93. 19 9
      Script/AtomicEditor/ui/modal/About.ts
  94. 25 6
      Script/AtomicEditor/ui/modal/CreateProject.ts
  95. 45 0
      Script/AtomicEditor/ui/modal/ExtensionWindow.ts
  96. 19 4
      Script/AtomicEditor/ui/modal/MessageModal.ts
  97. 29 4
      Script/AtomicEditor/ui/modal/ModalOps.ts
  98. 19 4
      Script/AtomicEditor/ui/modal/ModalWindow.ts
  99. 19 4
      Script/AtomicEditor/ui/modal/NewProject.ts
  100. 19 4
      Script/AtomicEditor/ui/modal/ProgressModal.ts

+ 4 - 0
AUTHORS.md

@@ -27,6 +27,10 @@
 
 - Gareth Fouche (https://github.com/GarethNN)
 
+- Wynand van Vuuren (https://github.com/Vlamboljant)
+
+- Johnny Wahib (https://github.com/JohnnyWahib)
+
 ### Contribution Copyright and Licensing
 
 Atomic Game Engine contribution copyrights are held by their authors.  Each author retains the copyright to their contribution and agrees to irrevocably license the contribution under the Atomic Game Engine Contribution License `CONTRIBUTION_LICENSE.md`.  Please see `CONTRIBUTING.md` for more details.

+ 1 - 1
Build/CIScripts/BuildWeb.js

@@ -23,7 +23,7 @@ namespace('build', function() {
 
       atomicTool + " bind " + bcommon.atomicRoot + " Script/Packages/Atomic/ WEB",
       atomicTool + " bind " + bcommon.atomicRoot + " Script/Packages/AtomicPlayer/ WEB",
-      "cmake -DEMSCRIPTEN=1 -DATOMIC_BUILD_2D=1 -DCMAKE_TOOLCHAIN_FILE=" + bcommon.atomicRoot + "Build/CMake/Toolchains/emscripten.toolchain.cmake -DCMAKE_BUILD_TYPE=Release ../../../../",
+      "cmake -DEMSCRIPTEN=1 -DCMAKE_TOOLCHAIN_FILE=" + bcommon.atomicRoot + "Build/CMake/Toolchains/emscripten.toolchain.cmake -DCMAKE_BUILD_TYPE=Release ../../../../",
       "make -j4",
       "cd ./Source/AtomicPlayer/Application && mv ./AtomicPlayer ./AtomicPlayer.bc && " +
       // -s ERROR_ON_UNDEFINED_SYMBOLS=1 (disabled for pthread errors currently on incoming)

+ 63 - 6
Build/CIScripts/GenEditorData.js

@@ -6,6 +6,8 @@ var buildDir = bcommon.artifactsRoot + "Build/EditorData/";
 var jsDocFolder = bcommon.artifactsRoot + "Build/JSDoc/";
 var atomicRoot = bcommon.atomicRoot;
 var atomicTool = host.getAtomicToolBinary();
+var glob = require("glob");
+var Tslint = require("tslint");
 
 namespace('build', function() {
 
@@ -87,6 +89,45 @@ namespace('build', function() {
 
   });
 
+  // Linting task
+  task('lint_typescript', {
+      async: true
+  }, function(fileMask, failOnError) {
+
+    console.log("TSLINT: Linting files in " + fileMask);
+    var lintConfig = JSON.parse(fs.readFileSync("./Script/tslint.json"));
+    var options = {
+        configuration: lintConfig,
+        formatter: "prose"
+    };
+
+    // lint
+    // Since TSLint does not yet support recursively searching for files, then we need to
+    // create a command per file.  The main issue with this is that it will abort on the first error instead
+    // of listing out all lint errors
+    glob(fileMask, function(err, results) {
+      var lintErrors = [];
+      results.forEach(function(filename) {
+
+        var contents = fs.readFileSync(filename, "utf8");
+
+        var ll = new Tslint(filename, contents, options);
+        var result = ll.lint();
+        if (result.failureCount > 0) {
+            lintErrors.push(result.output);
+        }
+      });
+      if (lintErrors.length > 0) {
+          console.warn("TSLINT: WARNING - Lint errors detected");
+          console.warn(lintErrors.join(''));
+          if (failOnError) {
+              fail("TSLint errors detected");
+          }
+      }
+      complete();
+    });
+  });
+
   task('compileeditorscripts', ["build:genscriptbindings"],{
     async: true
   }, function() {
@@ -102,17 +143,33 @@ namespace('build', function() {
       atomicRoot + "Build/Mac/node/node " + tsc + " -p ./Script/AtomicWebViewEditor"
     ];
 
-    jake.exec(cmds, function() {
-
       // will be copied when editor resources are copied
 
-      complete();
+    var lintTask = jake.Task['build:lint_typescript'];
 
-    }, {
-      printStdout: true
-    });
+    lintTask.addListener('complete', function () {
+      console.log("\n\nLint: Typescript linting complete.\n\n");
+      jake.exec(cmds, function() {
+
+          // copy some external dependencies into the editor modules directory
+         var editorModulesDir = "./Artifacts/Build/Resources/EditorData/AtomicEditor/EditorScripts/AtomicEditor/modules";
+         var webeditorModulesDir = "./Data/AtomicEditor/CodeEditor/source/editorCore/modules";
+         var nodeModulesDir = "./Build/node_modules";
+         fs.mkdirsSync(editorModulesDir);
+         // TypeScript
+         fs.copySync(nodeModulesDir + "/typescript/lib/typescript.js", webeditorModulesDir + "/typescript.js")
+
+         // copy lib.core.d.ts into the tool data directory
+         fs.mkdirsSync("./Artifacts/Build/Resources/EditorData/AtomicEditor/EditorScripts/AtomicEditor/TypeScriptSupport");
+         fs.copySync("./Build/node_modules/typescript/lib/lib.core.d.ts","./Data/AtomicEditor/TypeScriptSupport/lib.core.d.ts")
+         complete();
 
+      }, {
+        printStdout: true
+      });
+    });
 
+    lintTask.invoke("{./Script/AtomicEditor/**/*.ts,./Script/AtomicWebViewEditor/**/*.ts}", false);
   });
 
   task('geneditordata', ["build:compileeditorscripts", "build:ios_deploy", "build:gendocs"], {

+ 7 - 0
Build/CMake/Modules/AtomicCommon.cmake

@@ -1,3 +1,10 @@
 
 set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DATOMIC_DEBUG")
 set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DATOMIC_DEBUG")
+
+if(CMAKE_SIZEOF_VOID_P MATCHES 8)
+  set(ATOMIC_PROJECT_ARCH "x86_64")
+else()
+  set(ATOMIC_PROJECT_ARCH "x86")
+endif()
+

+ 16 - 2
Build/CMake/Modules/AtomicDesktop.cmake

@@ -3,12 +3,26 @@ include(AtomicCommon)
 
 include_directories(${CMAKE_SOURCE_DIR}/Source/ThirdParty/Poco/Foundation/include)
 
-add_definitions( -DATOMIC_NAVIGATION -DATOMIC_TBUI -DATOMIC_FILEWATCHER -DPOCO_NO_AUTOMATIC_LIBS -DPOCO_STATIC )
+add_definitions( -DATOMIC_PLATFORM_DESKTOP -DATOMIC_NAVIGATION -DATOMIC_TBUI -DATOMIC_FILEWATCHER -DPOCO_NO_AUTOMATIC_LIBS -DPOCO_STATIC )
 
-set (ATOMIC_LINK_LIBRARIES ${ATOMIC_LINK_LIBRARIES} LibCpuId SQLite)
+set (ATOMIC_LINK_LIBRARIES ${ATOMIC_LINK_LIBRARIES} LibCpuId SQLite libsquish)
 
 # Check whether the CEF submodule is available
 if (EXISTS ${CMAKE_SOURCE_DIR}/Submodules/CEF)
+    #Check if CEF got pulled by looking if the foldes is empty
+    file(GLOB CEF_FILES ${CMAKE_SOURCE_DIR}/Submodules/CEF/*)
+
+    list(LENGTH CEF_FILES CEF_FILES_LEN)
+    if(CEF_FILES_LEN EQUAL 0)
+     message(STATUS "Initialising CEF submodule")
+
+     find_package(Git REQUIRED)
+     if(GIT_FOUND)
+      execute_process(COMMAND git submodule update --init --remote)
+     else ()
+      message(STATUS "Could not find git in your Path. Please install git")
+     endif(GIT_FOUND)
+    endif()
     set(ATOMIC_WEBVIEW TRUE)
     add_definitions( -DATOMIC_WEBVIEW )
     include("AtomicWebView")

+ 21 - 19
Build/CMake/Modules/AtomicWebView.cmake

@@ -15,12 +15,6 @@ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
   set(OS_WINDOWS 1)
 endif()
 
-if(CMAKE_SIZEOF_VOID_P MATCHES 8)
-  set(PROJECT_ARCH "x86_64")
-else()
-  set(PROJECT_ARCH "x86")
-endif()
-
 if(OS_MACOSX)
     set(CEF_STANDARD_LIBS "-lpthread" "-framework Cocoa" "-framework AppKit")
     set(CEF_LIBTYPE SHARED)
@@ -39,10 +33,18 @@ if(OS_MACOSX)
 endif()
 
 if(OS_WINDOWS)
-    set(CEF_BINARY_DIR_RELEASE "${CMAKE_SOURCE_DIR}/Submodules/CEF/Windows/64bit/Release")
-    set(CEF_LIB_RELEASE "${CEF_BINARY_DIR_RELEASE}/libcef.lib")
-    set(CEF_BINARY_DIR "${CMAKE_SOURCE_DIR}/Submodules/CEF/Windows/64bit/Release")
-    set(CEF_RESOURCE_DIR "${CMAKE_SOURCE_DIR}/Submodules/CEF/Windows/64bit/Resources")
+
+    if (ATOMIC_PROJECT_ARCH STREQUAL "x86")
+        set(CEF_BINARY_DIR_RELEASE "${CMAKE_SOURCE_DIR}/Submodules/CEF/Windows/32bit/Release")
+        set(CEF_LIB_RELEASE "${CEF_BINARY_DIR_RELEASE}/libcef.lib")
+        set(CEF_BINARY_DIR "${CMAKE_SOURCE_DIR}/Submodules/CEF/Windows/32bit/Release")
+        set(CEF_RESOURCE_DIR "${CMAKE_SOURCE_DIR}/Submodules/CEF/Windows/32bit/Resources")
+    else()
+        set(CEF_BINARY_DIR_RELEASE "${CMAKE_SOURCE_DIR}/Submodules/CEF/Windows/64bit/Release")
+        set(CEF_LIB_RELEASE "${CEF_BINARY_DIR_RELEASE}/libcef.lib")
+        set(CEF_BINARY_DIR "${CMAKE_SOURCE_DIR}/Submodules/CEF/Windows/64bit/Release")
+        set(CEF_RESOURCE_DIR "${CMAKE_SOURCE_DIR}/Submodules/CEF/Windows/64bit/Resources")
+    endif()
 endif()
 
 if(OS_LINUX)
@@ -94,7 +96,7 @@ macro(SET_CEF_TARGET_OUT_DIR)
   else()
     # ATOMIC: Unix Makefiles not creating Debug/Release?
 
-    if(${CMAKE_GENERATOR} STREQUAL "Xcode" OR ${CMAKE_GENERATOR} STREQUAL "Visual Studio 14 2015 Win64")
+    if(${CMAKE_GENERATOR} STREQUAL "Xcode" OR ${CMAKE_GENERATOR} STREQUAL "Visual Studio 14 2015" OR ${CMAKE_GENERATOR} STREQUAL "Visual Studio 14 2015 Win64")
       set(CEF_TARGET_OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>")
     else()
       set(CEF_TARGET_OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}")
@@ -337,14 +339,14 @@ set(CEF_BINARY_FILES
   snapshot_blob.bin
   )
 
-# We don't have a 32 bit build right now
-#if(PROJECT_ARCH STREQUAL "x86")
-# Only used on 32-bit platforms.
-#  set(CEF_BINARY_FILES
-#    ${CEF_BINARY_FILES}
-#    wow_helper.exe
-#    )
-#endif()
+
+if(ATOMIC_PROJECT_ARCH STREQUAL "x86")
+    #Only used on 32-bit platforms.
+  set(CEF_BINARY_FILES
+    ${CEF_BINARY_FILES}
+    wow_helper.exe
+    )
+endif()
 
 # List of CEF resource files.
 set(CEF_RESOURCE_FILES

+ 6 - 1
Build/CMake/Modules/AtomicWindows.cmake

@@ -29,10 +29,15 @@ else()
 
 endif()
 
+# removes dependency on D3DCompiler dll for Atomic Direct3D9 builds which don't require it
+# (binaries that never initialize the Direct3D9 graphics subsystem)
+if (NOT ATOMIC_D3DCOMPILER_DISABLE AND NOT ATOMIC_UWEBKIT)
+  add_definitions(-DATOMIC_D3DCOMPILER_ENABLED)
+endif()
 
 
 # compile with static runtime
-set(CompilerFlags CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE)
+set( CompilerFlags CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO )
 
 foreach(CompilerFlag ${CompilerFlags})
     string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")

+ 2 - 2
Build/CMake/Toolchains/emscripten.toolchain.cmake

@@ -35,8 +35,8 @@ set (CMAKE_SYSTEM_NAME Linux)
 set (CMAKE_SYSTEM_VERSION 1)
 
 # specify the cross compiler
-if (NOT EMSCRIPTEN_ROOT_PATH AND DEFINED ENV{EMSCRIPTEN_ROOT_PATH})
-    file (TO_CMAKE_PATH $ENV{EMSCRIPTEN_ROOT_PATH} EMSCRIPTEN_ROOT_PATH)
+if (NOT EMSCRIPTEN_ROOT_PATH AND DEFINED ENV{EMSCRIPTEN})
+    file (TO_CMAKE_PATH $ENV{EMSCRIPTEN} EMSCRIPTEN_ROOT_PATH)
 endif ()
 if (NOT EXISTS ${EMSCRIPTEN_ROOT_PATH}/emcc)
     message (FATAL_ERROR "Could not find Emscripten cross compilation tool. "

+ 11 - 0
Build/Scripts/BuildCommon.js

@@ -88,6 +88,17 @@ namespace('build', function() {
             console.log("\n\nLint: Typescript linting complete.\n\n");
             jake.exec(cmds, function() {
 
+                // copy some external dependencies into the editor modules directory
+               var editorModulesDir = "./Artifacts/Build/Resources/EditorData/AtomicEditor/EditorScripts/AtomicEditor/modules";
+               var webeditorModulesDir = "./Data/AtomicEditor/CodeEditor/source/editorCore/modules";
+               var nodeModulesDir = "./Build/node_modules";
+               fs.mkdirsSync(editorModulesDir);
+               // TypeScript
+               fs.copySync(nodeModulesDir + "/typescript/lib/typescript.js", webeditorModulesDir + "/typescript.js")
+
+               // copy lib.core.d.ts into the tool data directory
+               fs.mkdirsSync("./Artifacts/Build/Resources/EditorData/AtomicEditor/EditorScripts/AtomicEditor/TypeScriptSupport");
+               fs.copySync("./Build/node_modules/typescript/lib/lib.core.d.ts","./Data/AtomicEditor/TypeScriptSupport/lib.core.d.ts")
                complete();
 
             }, {

+ 8 - 0
Build/Scripts/BuildLinux.js

@@ -57,6 +57,14 @@ task('atomiceditor', {
       fs.copySync(buildDir +  "Source/AtomicPlayer/Application/AtomicPlayer",
         editorAppFolder + "Resources/ToolData/Deployment/Linux/AtomicPlayer");
 
+      // Copy CEF support files
+      fs.copySync(atomicRoot + "Submodules/CEF/Linux/Resources/icudtl.dat",
+        editorAppFolder+"/icudtl.dat");
+      fs.copySync(atomicRoot + "Submodules/CEF/Linux/Release/natives_blob.bin",
+        editorAppFolder+"/natives_blob.bin");
+      fs.copySync(atomicRoot + "Submodules/CEF/Linux/Release/snapshot_blob.bin",
+        editorAppFolder+"/snapshot_blob.bin");
+
     console.log("\n\nAtomic Editor build to " + editorAppFolder + "\n\n");
 
     complete();

+ 75 - 0
Build/Scripts/BuildWeb.js

@@ -0,0 +1,75 @@
+var fs = require('fs-extra');
+var path = require("path");
+var host = require("./Host");
+var os = require('os');
+var atomicRoot = host.atomicRoot;
+
+var buildDir = host.artifactsRoot + "Build/Web/AtomicPlayer";
+
+// build command:
+// ./Build/Mac/node/node ./Build/node_modules/jake/bin/cli.js -f ./Build/Scripts/Bootstrap.js build:web_player
+
+namespace('build', function() {
+
+  task('web_player'/*, ["build:atomiceditor"]*/, {
+    async: true
+  }, function() {
+
+    // TODO: add clean build option
+    if (!fs.existsSync(buildDir)) {
+      common.cleanCreateDir(buildDir);
+    }
+
+    process.chdir(buildDir);
+
+    var cmds = [];
+
+    var scriptModules = host.getScriptModules("WEB");
+
+    var bindCmd = host.atomicTool + " bind \"" + atomicRoot + "\" ";
+
+    // Generate bindings for each script package
+    for (var pkgName in scriptModules) {
+      cmds.push(bindCmd + "Script/Packages/" + pkgName + "/ WEB")
+    }
+
+    if (os.platform() == "win32") {
+
+    }
+    else {
+      cmds.push("cmake -DEMSCRIPTEN=1 -DCMAKE_TOOLCHAIN_FILE=\"" + atomicRoot + "Build/CMake/Toolchains/emscripten.toolchain.cmake\" -DCMAKE_BUILD_TYPE=Release ../../../../");
+      cmds.push("make -j4");
+      // -s ERROR_ON_UNDEFINED_SYMBOLS=1 (disabled for pthread errors currently on incoming)
+      cmds.push("cd ./Source/AtomicPlayer/Application && mv ./AtomicPlayer ./AtomicPlayer.bc && " +
+      "emcc -O3 -s USE_PTHREADS=0 -s ASM_JS=1 -s VERBOSE=0 -s USE_SDL=2 -s TOTAL_MEMORY=134217728 -s AGGRESSIVE_VARIABLE_ELIMINATION=1 -s NO_EXIT_RUNTIME=1 ./AtomicPlayer.bc -o ./AtomicPlayer.html");
+    }
+
+    jake.exec(cmds, function() {
+
+      var editorAppFolder = host.artifactsRoot + (os.platform() == "win32" ? "AtomicEditor/" : "AtomicEditor/AtomicEditor.app/");
+
+      var webPlayerBinary = buildDir + "/Source/AtomicPlayer/Application/AtomicPlayer.js";
+      var webPlayerMemFile = buildDir + "/Source/AtomicPlayer/Application/AtomicPlayer.html.mem";
+
+      // Install Deployment
+
+      // Don't put into Artifact editor build as this requires a Emscripten install
+      // fs.copySync(webPlayerBinary, editorAppFolder + "Resources/ToolData/Deployment/Web/AtomicPlayer.js");
+      // fs.copySync(webPlayerMemFile, editorAppFolder + "Resources/ToolData/Deployment/Web/AtomicPlayer.html.mem");
+
+      // Instead, use local build
+      fs.copySync(webPlayerBinary, atomicRoot + "Data/AtomicEditor/Deployment/Web/AtomicPlayer.js");
+      fs.copySync(webPlayerMemFile, atomicRoot + "Data/AtomicEditor/Deployment/Web/AtomicPlayer.html.mem");
+
+      console.log("Built Web Player");
+
+      complete();
+
+    }, {
+      printStdout: true,
+      breakOnError : false
+    });
+
+  });
+
+}); // end of build namespace

+ 1 - 0
Build/Scripts/Host.js

@@ -13,3 +13,4 @@ if (os.platform() == "win32") {
 
 require("./BuildCommon");
 require("./BuildAndroid");
+require("./BuildWeb");

File diff suppressed because it is too large
+ 220 - 170
Build/node_modules/typescript/lib/tsc.js


File diff suppressed because it is too large
+ 277 - 168
Build/node_modules/typescript/lib/tsserver.js


+ 7 - 8
Build/node_modules/typescript/lib/typescript.d.ts

@@ -1178,7 +1178,8 @@ declare namespace ts {
         buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): void;
         buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
         buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
-        buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void;
+        buildTypePredicateDisplay(predicate: TypePredicate, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
+        buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
         buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
         buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
         buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
@@ -1218,17 +1219,18 @@ declare namespace ts {
         This = 0,
         Identifier = 1,
     }
-    interface TypePredicate {
+    interface TypePredicateBase {
         kind: TypePredicateKind;
         type: Type;
     }
-    interface ThisTypePredicate extends TypePredicate {
+    interface ThisTypePredicate extends TypePredicateBase {
         _thisTypePredicateBrand: any;
     }
-    interface IdentifierTypePredicate extends TypePredicate {
+    interface IdentifierTypePredicate extends TypePredicateBase {
         parameterName: string;
         parameterIndex: number;
     }
+    type TypePredicate = IdentifierTypePredicate | ThisTypePredicate;
     enum SymbolFlags {
         None = 0,
         FunctionScopedVariable = 1,
@@ -1329,7 +1331,6 @@ declare namespace ts {
         ESSymbol = 16777216,
         ThisType = 33554432,
         ObjectLiteralPatternWithComputedProperties = 67108864,
-        PredicateType = 134217728,
         StringLike = 258,
         NumberLike = 132,
         ObjectType = 80896,
@@ -1342,9 +1343,6 @@ declare namespace ts {
         symbol?: Symbol;
         pattern?: DestructuringPattern;
     }
-    interface PredicateType extends Type {
-        predicate: ThisTypePredicate | IdentifierTypePredicate;
-    }
     interface StringLiteralType extends Type {
         text: string;
     }
@@ -1479,6 +1477,7 @@ declare namespace ts {
         forceConsistentCasingInFileNames?: boolean;
         allowSyntheticDefaultImports?: boolean;
         allowJs?: boolean;
+        noImplicitUseStrict?: boolean;
         [option: string]: string | number | boolean;
     }
     enum ModuleKind {

File diff suppressed because it is too large
+ 276 - 171
Build/node_modules/typescript/lib/typescript.js


+ 7 - 8
Build/node_modules/typescript/lib/typescriptServices.d.ts

@@ -1178,7 +1178,8 @@ declare namespace ts {
         buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): void;
         buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
         buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
-        buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void;
+        buildTypePredicateDisplay(predicate: TypePredicate, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
+        buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
         buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
         buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
         buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
@@ -1218,17 +1219,18 @@ declare namespace ts {
         This = 0,
         Identifier = 1,
     }
-    interface TypePredicate {
+    interface TypePredicateBase {
         kind: TypePredicateKind;
         type: Type;
     }
-    interface ThisTypePredicate extends TypePredicate {
+    interface ThisTypePredicate extends TypePredicateBase {
         _thisTypePredicateBrand: any;
     }
-    interface IdentifierTypePredicate extends TypePredicate {
+    interface IdentifierTypePredicate extends TypePredicateBase {
         parameterName: string;
         parameterIndex: number;
     }
+    type TypePredicate = IdentifierTypePredicate | ThisTypePredicate;
     enum SymbolFlags {
         None = 0,
         FunctionScopedVariable = 1,
@@ -1329,7 +1331,6 @@ declare namespace ts {
         ESSymbol = 16777216,
         ThisType = 33554432,
         ObjectLiteralPatternWithComputedProperties = 67108864,
-        PredicateType = 134217728,
         StringLike = 258,
         NumberLike = 132,
         ObjectType = 80896,
@@ -1342,9 +1343,6 @@ declare namespace ts {
         symbol?: Symbol;
         pattern?: DestructuringPattern;
     }
-    interface PredicateType extends Type {
-        predicate: ThisTypePredicate | IdentifierTypePredicate;
-    }
     interface StringLiteralType extends Type {
         text: string;
     }
@@ -1479,6 +1477,7 @@ declare namespace ts {
         forceConsistentCasingInFileNames?: boolean;
         allowSyntheticDefaultImports?: boolean;
         allowJs?: boolean;
+        noImplicitUseStrict?: boolean;
         [option: string]: string | number | boolean;
     }
     enum ModuleKind {

File diff suppressed because it is too large
+ 276 - 171
Build/node_modules/typescript/lib/typescriptServices.js


+ 19 - 15
Build/node_modules/typescript/package.json

@@ -1,15 +1,19 @@
 {
   "_args": [
     [
-      "[email protected]",
-      "/Users/shaddockh/Development/AtomicProjects/AtomicGameEngineFork/AtomicGameEngine/Build"
+      "typescript@^1.8.0",
+      "/Users/shaddockh/Development/Atomic/AtomicFork/AtomicGameEngine/Build"
     ]
   ],
-  "_from": "typescript@>=1.8.0 <1.9.0",
-  "_id": "[email protected].0",
+  "_from": "typescript@>=1.8.0 <2.0.0",
+  "_id": "[email protected].2",
   "_inCache": true,
   "_installable": true,
   "_location": "/typescript",
+  "_npmOperationalInternal": {
+    "host": "packages-6-west.internal.npmjs.com",
+    "tmp": "tmp/typescript-1.8.2.tgz_1456180363305_0.6699868906289339"
+  },
   "_npmUser": {
     "email": "[email protected]",
     "name": "typescript"
@@ -18,20 +22,20 @@
   "_phantomChildren": {},
   "_requested": {
     "name": "typescript",
-    "raw": "[email protected]",
-    "rawSpec": "1.8",
+    "raw": "typescript@^1.8.0",
+    "rawSpec": "^1.8.0",
     "scope": null,
-    "spec": ">=1.8.0 <1.9.0",
+    "spec": ">=1.8.0 <2.0.0",
     "type": "range"
   },
   "_requiredBy": [
     "/"
   ],
-  "_resolved": "https://registry.npmjs.org/typescript/-/typescript-1.8.0.tgz",
-  "_shasum": "cc5bc63d7f7d84ea26debd7adb774c0362b0ec11",
+  "_resolved": "https://registry.npmjs.org/typescript/-/typescript-1.8.2.tgz",
+  "_shasum": "4d2ad7db172be67a913d09862b510133bad61b33",
   "_shrinkwrap": null,
-  "_spec": "[email protected]",
-  "_where": "/Users/shaddockh/Development/AtomicProjects/AtomicGameEngineFork/AtomicGameEngine/Build",
+  "_spec": "typescript@^1.8.0",
+  "_where": "/Users/shaddockh/Development/Atomic/AtomicFork/AtomicGameEngine/Build",
   "author": {
     "name": "Microsoft Corp."
   },
@@ -63,13 +67,13 @@
   },
   "directories": {},
   "dist": {
-    "shasum": "cc5bc63d7f7d84ea26debd7adb774c0362b0ec11",
-    "tarball": "http://registry.npmjs.org/typescript/-/typescript-1.8.0.tgz"
+    "shasum": "4d2ad7db172be67a913d09862b510133bad61b33",
+    "tarball": "http://registry.npmjs.org/typescript/-/typescript-1.8.2.tgz"
   },
   "engines": {
     "node": ">=0.8.0"
   },
-  "gitHead": "a288b84632c1400806df55025ca6b568cfa4d00e",
+  "gitHead": "e5dd34f9e69f517182abfc996a10b8312b14e015",
   "homepage": "http://typescriptlang.org/",
   "keywords": [
     "Microsoft",
@@ -105,5 +109,5 @@
     "test": "jake runtests"
   },
   "typings": "./lib/typescript.d.ts",
-  "version": "1.8.0"
+  "version": "1.8.2"
 }

+ 3 - 3
Build/npm-shrinkwrap.json

@@ -163,9 +163,9 @@
       "resolved": "https://registry.npmjs.org/tslint/-/tslint-3.2.1.tgz"
     },
     "typescript": {
-      "version": "1.8.0",
-      "from": "typescript@>=1.8.0 <1.9.0",
-      "resolved": "https://registry.npmjs.org/typescript/-/typescript-1.8.0.tgz"
+      "version": "1.8.2",
+      "from": "typescript@>=1.8.0 <2.0.0",
+      "resolved": "https://registry.npmjs.org/typescript/-/typescript-1.8.2.tgz"
     },
     "underscore.string": {
       "version": "3.1.1",

+ 3 - 2
Build/package.json

@@ -5,6 +5,7 @@
     "glob": "^6.0.3",
     "jake": "^8.0.12",
     "tslint": "^3.2.0",
-    "typescript": "^1.8.0"
-  }
+    "typescript": "^1.8.2"
+  },
+  "devDependencies": {}
 }

+ 13 - 2
CMakeLists.txt

@@ -72,11 +72,22 @@ endif()
 
 if (ATOMIC_WEBVIEW)
   if(APPLE)
+    if(POLICY CMP0037)
+      # new cmake doesn't like creating framework whose name has spaces
+      # which CEF3 scripts (including shell) currently require on OSX
+      cmake_policy(SET CMP0037 OLD)
+    endif()
     include_directories (${CMAKE_SOURCE_DIR}/Submodules/CEF/MacOSX/)
     add_subdirectory(Submodules/CEF/MacOSX/libcef_dll)
   elseif(MSVC)
-    include_directories (${CMAKE_SOURCE_DIR}/Submodules/CEF/Windows/64bit)
-    add_subdirectory(Submodules/CEF/Windows/64bit/libcef_dll)
+    if (ATOMIC_PROJECT_ARCH STREQUAL "x86")
+        include_directories (${CMAKE_SOURCE_DIR}/Submodules/CEF/Windows/32bit)
+        add_subdirectory(Submodules/CEF/Windows/32bit/libcef_dll)
+    else()
+        include_directories (${CMAKE_SOURCE_DIR}/Submodules/CEF/Windows/64bit)
+        add_subdirectory(Submodules/CEF/Windows/64bit/libcef_dll)
+    endif()
+
   else()
     include_directories (${CMAKE_SOURCE_DIR}/Submodules/CEF/Linux)
     add_subdirectory(Submodules/CEF/Linux/libcef_dll)

+ 1 - 1
Data/AtomicEditor/CodeEditor/.gitignore

@@ -1 +1 @@
-editor.bundle.*
+source/editorCore

+ 14 - 3
Data/AtomicEditor/CodeEditor/Editor.html

@@ -25,10 +25,21 @@
 
   <script src="./source/ace/ace.js" type="text/javascript" charset="utf-8"></script>
   <script src="./source/ace/ext-language_tools.js"></script>
-  <script src="./source/systemjs/system-register-only.js" type="text/javascript" charset="utf-8"></script>
-  <script src="./editor.bundle.js" type="text/javascript" charset="utf-8"></script>
+  <script src="./source/systemjs/system.js" type="text/javascript" charset="utf-8"></script>
   <script>
-    System.import('./interop');
+    System.config({
+        "baseURL": "/",
+        "defaultJSExtensions": true,
+        // TODO: figure out how to make this be loaded in by the extension instead of being hard-coded in the html page
+        meta: {
+        './source/editorCore/modules/typescript.js': {
+          format: 'global',
+          exports: 'ts',
+        }
+      }
+    });
+
+    System.import('./source/editorCore/interop');
   </script>
 
 </body>

File diff suppressed because it is too large
+ 3 - 0
Data/AtomicEditor/CodeEditor/source/systemjs/system.js


+ 2 - 0
Data/AtomicEditor/Deployment/MacOS/AtomicPlayer.app/Contents/Info.plist

@@ -39,5 +39,7 @@
         <key>URHO3D_PREFIX_PATH</key>
         <string>../Resources</string>
     </dict>
+    <key>NSHighResolutionCapable</key>
+    <true/>
 </dict>
 </plist>

+ 16 - 0
Data/AtomicEditor/ProjectTemplates/Project2D/JavaScript/Resources/Components/Spinner.js

@@ -0,0 +1,16 @@
+"atomic component";
+//inspector fields to make speed variable visible in editor
+var inspectorFields = {
+    speed: 1.0
+}
+
+exports.component = function(self) {
+    
+    //update function calls each frame
+    self.update = function(timeStep) {
+        //roll a node
+        self.node.roll(timeStep * 100);
+
+    }
+
+}

+ 0 - 15
Data/AtomicEditor/ProjectTemplates/Project2D/JavaScript/Resources/Components/Star.js

@@ -1,15 +0,0 @@
-"atomic component";
-
-var inspectorFields = {
-  speed: 1.0
-}
-
-exports.component = function(self) {
-
-  self.update = function(timeStep) {
-
-    self.node.rotate2D(timeStep * 75 * self.speed);
-
-  }
-
-}

+ 25 - 11
Data/AtomicEditor/ProjectTemplates/Project2D/JavaScript/Resources/Scenes/Scene.scene

@@ -5,8 +5,8 @@
 	<attribute name="Smoothing Constant" value="50" />
 	<attribute name="Snap Threshold" value="5" />
 	<attribute name="Elapsed Time" value="0" />
-	<attribute name="Next Replicated Node ID" value="364" />
-	<attribute name="Next Replicated Component ID" value="1978" />
+	<attribute name="Next Replicated Node ID" value="370" />
+	<attribute name="Next Replicated Component ID" value="1987" />
 	<attribute name="Next Local Node ID" value="16778496" />
 	<attribute name="Next Local Component ID" value="16777216" />
 	<attribute name="Variables" />
@@ -14,32 +14,46 @@
 	<component type="PhysicsWorld" id="1" />
 	<component type="Octree" id="2" />
 	<component type="DebugRenderer" id="3" />
-	<component type="Renderer2D" id="1976" />
+	<component type="Renderer2D" id="1980" />
+	<node id="2">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Zone" />
+		<attribute name="Position" value="0 0 0" />
+		<attribute name="Rotation" value="1 0 0 0" />
+		<attribute name="Scale" value="1 1 1" />
+		<attribute name="Variables" />
+		<component type="Zone" id="4">
+			<attribute name="Bounding Box Min" value="-10000 -10000 -10000" />
+			<attribute name="Bounding Box Max" value="10000 10000 10000" />
+			<attribute name="Ambient Color" value="0.4 0.4 0.4 1" />
+		</component>
+	</node>
 	<node id="361">
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Name" value="Camera" />
-		<attribute name="Position" value="0 0 -5" />
+		<attribute name="Position" value="0 0 0" />
 		<attribute name="Rotation" value="1 0 0 0" />
 		<attribute name="Scale" value="1 1 1" />
 		<attribute name="Variables" />
 		<component type="Camera" id="1973">
 			<attribute name="Near Clip" value="0" />
 			<attribute name="Orthographic" value="true" />
-			<attribute name="Orthographic Size" value="8" />
+			<attribute name="Orthographic Size" value="5" />
 		</component>
 	</node>
 	<node id="363">
 		<attribute name="Is Enabled" value="true" />
-		<attribute name="Name" value="Node" />
-		<attribute name="Position" value="0 0 0" />
+		<attribute name="Name" value="Star" />
+		<attribute name="Position" value="0 0 3.4" />
 		<attribute name="Rotation" value="1 0 0 0" />
 		<attribute name="Scale" value="1 1 1" />
 		<attribute name="Variables" />
-		<component type="StaticSprite2D" id="1975">
-			<attribute name="Sprite" value="Sprite2D;Sprites/star.png" />
-		</component>
 		<component type="JSComponent" id="1977">
-			<attribute name="ComponentFile" value="JSComponentFile;Components/Star.js" />
+			<attribute name="ComponentFile" value="JSComponentFile;Components/Spinner.js" />
+		</component>
+		<component type="StaticSprite2D" id="1979">
+			<attribute name="Layer" value="-100" />
+			<attribute name="Sprite" value="Sprite2D;Sprites/star.png" />
 		</component>
 	</node>
 </scene>

+ 1 - 1
Data/AtomicEditor/ProjectTemplates/Project3D/JavaScript/Resources/Scenes/Scene.scene

@@ -56,7 +56,7 @@
 	<node id="363">
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Name" value="Chest" />
-		<attribute name="Position" value="0 -0.374877 0" />
+		<attribute name="Position" value="0 -0.374877 2" />
 		<attribute name="Rotation" value="1 0 0 0" />
 		<attribute name="Scale" value="1 1 1" />
 		<attribute name="Variables" />

+ 1 - 1
Data/AtomicEditor/ProjectTemplates/Project3D/TypeScript/Resources/Scenes/Scene.scene

@@ -56,7 +56,7 @@
 	<node id="363">
 		<attribute name="Is Enabled" value="true" />
 		<attribute name="Name" value="Chest" />
-		<attribute name="Position" value="0 -0.374877 0" />
+		<attribute name="Position" value="0 -0.374877 2" />
 		<attribute name="Rotation" value="1 0 0 0" />
 		<attribute name="Scale" value="1 1 1" />
 		<attribute name="Variables" />

+ 1 - 0
Data/AtomicEditor/TypeScriptSupport/.gitignore

@@ -0,0 +1 @@
+lib.core.d.ts

+ 9 - 0
Data/AtomicEditor/TypeScriptSupport/duktape.d.ts

@@ -0,0 +1,9 @@
+// Duktape built-ins
+
+// extracted from lib.d.ts
+declare interface Console {
+	log(message?: any, ...optionalParams: any[]): void;
+}
+
+declare var console:Console;
+

+ 43 - 7
Licenses/LICENSE_THIRDPARTY.md → LICENSE.md

@@ -1,13 +1,26 @@
+#### Atomic Game Engine License
+-------------------------------------
 
-### Third Party Technology Licenses and Copyrights
+Copyright (c) 2014-2016 THUNDERBEAST GAMES LLC  
+https://github.com/AtomicGameEngine/AtomicGameEngine
 
-This file contains information for third party technology used in the Atomic Game Engine
-
-Please see the The Atomic Game Engine™ Runtime EULA & Atomic Game Engine™ Editor and Tools EULA for additional licensing information.
+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 Atomic Game Engine™ Runtime EULA (MIT)](https://github.com/AtomicGameEngine/AtomicRuntime/blob/master/Licenses/LICENSE_ATOMIC_RUNTIME.md)
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
 
-#### [The Atomic Game Engine™ Editor and Tools EULA](https://github.com/AtomicGameEngine/AtomicGameEngine/blob/master/Licenses/LICENSE_ATOMIC_EDITOR_AND_TOOLS.md)
+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.
 
 ### Third Party Licenses
 -------------------------------------------------------------------
@@ -174,6 +187,29 @@ required.
 misrepresented as being the original software.
 3. This notice may not be removed or altered from any source distribution.
 
+#### libsquish license
+--------------
+
+Copyright (c) 2006 Simon Brown                          [email protected]
+
+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.
 
 #### Civetweb license
 ----------------
@@ -1109,7 +1145,7 @@ The externally maintained libraries used by Node.js are:
      * Hudson ([email protected]).
      *
      */
-     
+
 #### Chromium Embedded Framework
     // Copyright (c) 2008-2014 Marshall A. Greenblatt. Portions Copyright (c)
     // 2006-2009 Google Inc. All rights reserved.

+ 0 - 19
Licenses/CONTRIBUTION_LICENSE.md

@@ -1,19 +0,0 @@
-===============
-Atomic Game Engine Contribution License
-===============
-
-(http://opensource.org/licenses/MIT)
-
-Copyright (c) 2014-2015 by Atomic Game Engine Contributors (see AUTHORS.md)
-
-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.

File diff suppressed because it is too large
+ 0 - 89
Licenses/LICENSE_ATOMIC_EDITOR_AND_TOOLS.md


+ 0 - 31
Licenses/LICENSE_ATOMIC_RUNTIME.md

@@ -1,31 +0,0 @@
-###Atomic Game Engine™ Runtime End User License Agreement (EULA)
-
-**IMPORTANT:**
-
-**The Atomic Game Engine™ Runtime EULA** applies to the source code of the redistributable binary of end user games, simulations, and visualizations.
-
-The Atomic Editor, Atomic CLI, and other tooling is under the **Atomic Game Engine™ Editor and Tools EULA**.  Please see the LICENSE_ATOMIC_EDITOR_AND_TOOLS.md file which contains this license.
-
-The Atomic Game Engine contains third party technology available under permissive Open Source licenses. The LICENSE_THIRDPARTY.md file describes the copyrights and licenses associated with these technologies.
-
-####LICENSE
-
-Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
-
-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.

+ 30 - 40
README.md

@@ -1,60 +1,50 @@
-####Atomic Game Engine™ Editor and Player Source Repository
+[AtomicLogo]: https://github.com/AtomicGameEngine/AtomicGameEngine/wiki/images/repo/Atomic-Game-Engine-512.png
+![alt text][AtomicLogo]
+####Editor and Player Source Repository
 
-##### Website
+This repository contains the **full source code** to the Atomic Game Engine Runtime, Atomic Editor, and other tools.  The Atomic Game Engine is a cross platform authoring solution with **deployment to Windows, OSX, Android, iOS, Linux, and WebGL**. Games and applications can be written in **JavaScript, TypeScript, C++, with C# scripting in development**.
 
-<a href="http://atomicgameengine.com">http://www.AtomicGameEngine.com</a>
+####LICENSE
 
-###### Looking for the Javascript examples?
+The Atomic Game Engine source code is released under the permissive **[MIT license](https://opensource.org/licenses/MIT)**.  Please see  [LICENSE.md](https://github.com/AtomicGameEngine/AtomicGameEngine/blob/master/LICENSE.md) for complete licensing information.
 
-They are over here: <a href="https://github.com/AtomicGameEngine/AtomicExamples">Javascript Examples</a>
-
-###### Looking for Atomic-Haxe?
-
-It's here: <a href="https://github.com/rsredsq/atomic-haxe">Atomic-Haxe</a>  <sup>(Community Supported)</sup>
-
-##### Chat
-
-[![Join the chat at https://gitter.im/AtomicGameEngine/AtomicGameEngine](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/AtomicGameEngine/AtomicGameEngine?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-
-##### Forums
-
-<a href="http://atomicgameengine.com/forum">Atomic Game Engine Forums</a>
+####Documentation and Downloads
 
-##### Twitter
+**[Getting Started Documentation](http://atomicgameengine.com/learn/)** 
 
-<a href="https://twitter.com/AtomicGEngine">Follow @AtomicGEngine</a>
+**[Download the Atomic Editor](http://atomicgameengine.com/download/)** 
 
-[WelcomeScreen]: https://github.com/AtomicGameEngine/AtomicExamples/wiki/images/WelcomeScreen.png
+####Community
 
-![alt text][WelcomeScreen]
+**Facebook Group:** [https://www.facebook.com/groups/AtomicGameEngine/](https://www.facebook.com/groups/AtomicGameEngine/)
 
-This repository contains the **full source code** to the Atomic Game Engine Runtime, Atomic Editor, Atomic CLI, and other tools.
+**Forums:** [Atomic Forums](http://atomicgameengine.com/forum/)
 
-The source code is intended for licensees who need to customize the C++ runtime and editor.  For most users, we recommend the **supported binary releases** available for [DOWNLOAD](http://atomicgameengine.com/download) on our website.
+**Gitter Chat:** [![Join the chat at https://gitter.im/AtomicGameEngine/AtomicGameEngine](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/AtomicGameEngine/AtomicGameEngine?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+ 
+####Screenshots
 
-Custom builds of the Atomic Game Engine Editor require product activation and platform deployment licenses.  These can also be acquired at our website.
+#####Atomic Editor
+[RoboBeach]: https://github.com/AtomicGameEngine/AtomicGameEngine/wiki/images/repo/RoboBeach.png
+![alt text][RoboBeach]
 
-For **supported binary releases** and to acquire **product activation keys** or **platform deployment licenses** please visit: http://www.AtomicGameEngine.com
+#####Atomic Examples
+[DevSnapshot]: https://github.com/AtomicGameEngine/AtomicGameEngine/wiki/images/repo/DevSnapshot2116.png
+![alt text][DevSnapshot]
 
-### Licensing Information
+#####Atomic on Mobile
+[ToonTown]: https://github.com/AtomicGameEngine/AtomicGameEngine/wiki/images/repo/ToonTownTouchUpdate.gif
+![alt text][ToonTown]
 
-#### [The Atomic Game Engine™ Runtime EULA (MIT)](https://github.com/AtomicGameEngine/AtomicRuntime/blob/master/Licenses/LICENSE_ATOMIC_RUNTIME.md)
+#####Atomic Build Settings
+[AndroidBuildSettings]: https://github.com/AtomicGameEngine/AtomicGameEngine/wiki/images/repo/AndroidBuildSettings.png
+![alt text][AndroidBuildSettings] 
 
-> The full source code to the Atomic Runtime used by end user apps, games, simulations, and visualizations is available under the permissive **MIT license**
-
-#### [The Atomic Game Engine™ Editor and Tools EULA](https://github.com/AtomicGameEngine/AtomicRuntime/blob/master/Licenses/LICENSE_ATOMIC_EDITOR_AND_TOOLS.md)
-
-> The full source code to the Atomic Editor and other tooling is available under the terms of the [The Atomic Game Engine™ Editor and Tools EULA](https://github.com/AtomicGameEngine/AtomicRuntime/blob/master/Licenses/LICENSE_ATOMIC_EDITOR_AND_TOOLS.md)
-
-**[Third Party Licenses](https://github.com/AtomicGameEngine/AtomicRuntime/blob/master/Licenses/LICENSE_THIRDPARTY.md)**
-
-> The Atomic Game Engine contains third party technology available under permissive Open Source licenses.
+####Looking for the Javascript and TypeScript examples?
 
+They are over here: <a href="https://github.com/AtomicGameEngine/AtomicExamples">Javascript Examples</a>
 
-### Building the Atomic Editor from Source
+###Building the Atomic Editor from Source
 
 Please see [Building the Atomic Editor from Source](https://github.com/AtomicGameEngine/AtomicGameEngine/wiki/Building-the-Atomic-Editor-from-Source) for Visual Studio 2013, XCode, and QtCreator build instructions.
 
-### Website
-
-Visit http://www.AtomicGameEngine.com for all the latest news and downloads of the Atomic Game Engine

+ 1 - 6
Resources/EditorData/AtomicEditor/editor/ui/about.tb.txt

@@ -4,8 +4,7 @@ TBLayout: axis: y
 		id tabcontainer
 		tabs
 			TBButton: text: "About"
-			TBButton: text: "Editor and Tool License"
-			TBButton: text: "Runtime License"
+			TBButton: text: "Atomic Game Engine License"
 			TBButton: text: "Third Party Licenses"
 			TBButton: text: "External Tool Licenses"
 		TBEditField: multiline: 1, styling: 1, gravity: all, id: about_text, readonly: 1, adapt-to-content: 0
@@ -16,10 +15,6 @@ TBLayout: axis: y
 			font: size: 12
 			lp: max-width: 800, min-width: 800, min-height: 512, max-height: 512
 			text: "..."
-		TBEditField: multiline: 1, styling: 1, gravity: all, id: age_runtime_license, readonly: 1, adapt-to-content: 0
-			font: size: 12
-			lp: max-width: 800, min-width: 800, min-height: 512, max-height: 512
-			text: "..."			
 		TBEditField: multiline: 1, styling: 1, gravity: all, id: thirdparty_license, readonly: 1, adapt-to-content: 0
 			font: size: 12
 			lp: max-width: 800, min-width: 800, min-height: 512, max-height: 512

+ 1 - 6
Resources/EditorData/AtomicEditor/editor/ui/eulaagreement.tb.txt

@@ -3,18 +3,13 @@ TBLayout: axis: y
 		gravity all
 		id tabcontainer
 		tabs
-			TBButton: text: "Editor and Tool License"
-			TBButton: text: "Runtime License"
+			TBButton: text: "Atomic Game Engine License"
 			TBButton: text: "Third Party Licenses"
 			TBButton: text: "External Tool Licenses"
 		TBEditField: multiline: 1, styling: 1, gravity: all, id: age_license, readonly: 1, adapt-to-content: 0
 			font: size: 12
 			lp: max-width: 800, min-width: 800, min-height: 512, max-height: 512
 			text: "..."
-		TBEditField: multiline: 1, styling: 1, gravity: all, id: age_runtime_license, readonly: 1, adapt-to-content: 0
-			font: size: 12
-			lp: max-width: 800, min-width: 800, min-height: 512, max-height: 512
-			text: "..."			
 		TBEditField: multiline: 1, styling: 1, gravity: all, id: thirdparty_license, readonly: 1, adapt-to-content: 0
 			font: size: 12
 			lp: max-width: 800, min-width: 800, min-height: 512, max-height: 512

+ 4 - 0
Resources/EditorData/AtomicEditor/editor/ui/hierarchyframe.tb.txt

@@ -14,4 +14,8 @@ TBLayout: distribution: gravity, axis: y, id: hierarchyframe
 			gravity left right
 			placeholder @search
 			type search	
+		TBButton
+			@include definitions>menubutton
+			text X
+			id cancel search
 	TBLayout: distribution: gravity, id: hierarchycontainer, gravity: all

+ 4 - 0
Resources/EditorData/AtomicEditor/editor/ui/projectframe.tb.txt

@@ -14,6 +14,10 @@ TBLayout: distribution: gravity, axis: y, id: projectframe
 			gravity left right
 			placeholder @search
 			type search	
+		TBButton
+			@include definitions>menubutton
+			text X
+			id cancel search
 	TBWidget: gravity: all
 		TBLayout: distribution: gravity, id: foldercontainer, gravity: all
 	TBScrollContainer: scroll-mode: auto, id: contentcontainerscroll, gravity: all

+ 3 - 0
Resources/EditorData/AtomicEditor/editor/ui/resourceselection.tb.txt

@@ -10,6 +10,9 @@ TBLayout: distribution: gravity, axis: y, id: resourceselectionframe
 			gravity left right
 			placeholder @search
 			type search	
+		TBButton 
+			id cancel search
+			text X
 	TBWidget: gravity: all
 		TBLayout: distribution: gravity, id: resourcecontainer, gravity: all
 	TBLayout: 

File diff suppressed because it is too large
+ 0 - 73
Resources/EditorData/AtomicEditor/eulas/atomic_game_engine_eula.txt


+ 0 - 21
Resources/EditorData/AtomicEditor/eulas/atomic_runtime_eula.txt

@@ -1,21 +0,0 @@
-<color #D4FB79>Atomic Game Engine™ Runtime End User License Agreement (EULA)</color>
-
-Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
-
-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.

+ 26 - 6
Script/AtomicEditor/editor/Editor.ts

@@ -1,8 +1,23 @@
 //
-// 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 EditorUI = require("ui/EditorUI");
@@ -48,7 +63,7 @@ class Editor extends Atomic.ScriptObject {
 
         this.subscribeToEvent(EditorEvents.LoadProject, (data) => this.handleEditorLoadProject(data));
         this.subscribeToEvent(EditorEvents.CloseProject, (data) => this.handleEditorCloseProject(data));
-        this.subscribeToEvent("ProjectUnloaded", (data) => {
+        this.subscribeToEvent(EditorEvents.ProjectUnloadedNotification, (data) => {
             Atomic.graphics.windowTitle = "AtomicEditor";
             this.handleProjectUnloaded(data);
         });
@@ -134,7 +149,11 @@ class Editor extends Atomic.ScriptObject {
             return false;
 
         }
-        return system.loadProject(event.path);
+        const loaded = system.loadProject(event.path);
+        if (loaded) {
+            this.sendEvent(EditorEvents.LoadProjectNotification, event);
+        }
+        return loaded;
     }
 
     closeAllResourceEditors() {
@@ -156,6 +175,7 @@ class Editor extends Atomic.ScriptObject {
 
     handleEditorCloseProject(event) {
         this.projectCloseRequested = true;
+        this.sendEvent(EditorEvents.ProjectUnloadedNotification, event);
         this.closeAllResourceEditors();
     }
 

+ 59 - 8
Script/AtomicEditor/editor/EditorEvents.ts

@@ -1,10 +1,26 @@
 //
-// 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.
 //
 
+// TODO: migrate these interfaces out to the d.ts and migrate the static strings to some common location
 export const ModalError = "ModalError";
 export interface ModalErrorEvent {
 
@@ -12,7 +28,7 @@ export interface ModalErrorEvent {
   message: string;
 
 }
-
+export const PlayerStartRequest = "EditorPlayRequest";
 export const PlayerStarted = "EditorPlayerStarted";
 export const PlayerStopped = "EditorPlayerStopped";
 export const PlayerPaused = "EditorPlayerPaused";
@@ -50,8 +66,10 @@ export interface ContentFolderChangedEvent {
 
 export const CloseProject = "EditorCloseProject";
 export const ProjectClosed = "EditorProjectClosed";
+export const ProjectUnloadedNotification = "ProjectUnloadedNotification";
 
 export const LoadProject = "EditorLoadProject";
+export const LoadProjectNotification = "EditorLoadProjectNotification";
 export interface LoadProjectEvent {
 
   // The full path to the .atomic file
@@ -62,10 +80,14 @@ export interface LoadProjectEvent {
 export const SaveAllResources = "EditorSaveAllResources";
 
 export const SaveResource = "EditorSaveResource";
+/**
+ * Called once the resource has been saved
+ * @type {String}
+ */
+export const SaveResourceNotification = "EditorSaveResourceNotification";
 export interface SaveResourceEvent {
 
-  // The full path to the resource to save
-  // empty or undefined for current
+  // The full path to the resource to save / empty or undefined for current
   path: string;
 
 }
@@ -86,6 +108,36 @@ export interface EditResourceEvent {
 
 }
 
+export const DeleteResource = "EditorDeleteResource";
+/**
+ * Called once the resource has been deleted
+ * @type {String}
+ */
+export const DeleteResourceNotification = "DeleteResourceNotification";
+export interface DeleteResourceEvent {
+
+  // The full path to the resource to edit
+  path: string;
+
+}
+
+export const RenameResource = "EditorRenameResource";
+/**
+ * Called once the resource has been renamed
+ * @type {String}
+ */
+export const RenameResourceNotification = "RenameResourceNotification";
+export interface RenameResourceEvent {
+
+  // The full path to the resource to edit
+  path: string;
+  newPath: string;
+  newName: string;
+
+  // the asset to delete
+  asset: ToolCore.Asset;
+}
+
 export const SceneEditStateChange = "SceneEditStateChange";
 export interface SceneEditStateChangeEvent {
 
@@ -105,4 +157,3 @@ export const RemoveCurrentAssetAssigned = "RemoveCurrentAssetAssigned";
 export interface RemoveCurrentAssetAssignedEvent {
 
 }
-

+ 19 - 4
Script/AtomicEditor/editor/EditorLicense.ts

@@ -1,8 +1,23 @@
 //
-// 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 EditorUI = require("../ui/EditorUI");

+ 19 - 4
Script/AtomicEditor/editor/Preferences.ts

@@ -1,8 +1,23 @@
 //
-// 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.
 //
 
 class Preferences {

+ 372 - 0
Script/AtomicEditor/hostExtensions/HostExtensionServices.ts

@@ -0,0 +1,372 @@
+//
+// 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 * as EditorEvents from "../editor/EditorEvents";
+import * as EditorUI from "../ui/EditorUI";
+import MainFramMenu = require("../ui/frames/menus/MainFrameMenu");
+import HierarchyFrameMenu = require("../ui/frames/menus/HierarchyFrameMenu");
+import ProjectFrameMenu = require("../ui/frames/menus/ProjectFrameMenu");
+import ModalOps = require("../ui/modal/ModalOps");
+/**
+ * Generic registry for storing Editor Extension Services
+ */
+export class ServicesProvider<T extends Editor.Extensions.ServiceEventListener> implements Editor.Extensions.ServicesProvider<T> {
+    registeredServices: T[] = [];
+
+    /**
+     * Adds a service to the registered services list for this type of service
+     * @param  {T}      service the service to register
+     */
+    register(service: T) {
+        this.registeredServices.push(service);
+    }
+
+    unregister(service: T) {
+        var index = this.registeredServices.indexOf(service, 0);
+        if (index > -1) {
+            this.registeredServices.splice(index, 1);
+        }
+    }
+}
+
+export interface ServiceEventSubscriber {
+    /**
+     * Allow this service registry to subscribe to events that it is interested in
+     * @param  {Atomic.UIWidget} topLevelWindow The top level window that will be receiving these events
+     */
+    subscribeToEvents(topLevelWindow: Atomic.UIWidget);
+}
+
+/**
+ * Registry for service extensions that are concerned about project events
+ */
+export class ProjectServicesProvider extends ServicesProvider<Editor.HostExtensions.ProjectServicesEventListener> implements Editor.HostExtensions.ProjectServicesProvider {
+    constructor() {
+        super();
+    }
+
+    /**
+     * Allow this service registry to subscribe to events that it is interested in
+     * @param  {Atomic.UIWidget} topLevelWindow The top level window that will be receiving these events
+     */
+    subscribeToEvents(eventDispatcher: Editor.Extensions.EventDispatcher) {
+        eventDispatcher.subscribeToEvent(EditorEvents.LoadProjectNotification, (ev) => this.projectLoaded(ev));
+        eventDispatcher.subscribeToEvent(EditorEvents.CloseProject, (ev) => this.projectUnloaded(ev));
+        eventDispatcher.subscribeToEvent(EditorEvents.PlayerStartRequest, () => this.playerStarted());
+    }
+
+    /**
+     * Called when the project is unloaded
+     * @param  {[type]} data Event info from the project unloaded event
+     */
+    projectUnloaded(data) {
+        // Need to use a for loop for length down to 0 because extensions *could* delete themselves from the list on projectUnloaded
+        for (let i = this.registeredServices.length - 1; i >= 0; i--) {
+            let service = this.registeredServices[i];
+            // Notify services that the project has been unloaded
+            try {
+                if (service.projectUnloaded) {
+                    service.projectUnloaded();
+                }
+            } catch (e) {
+                EditorUI.showModalError("Extension Error", `Error detected in extension ${service.name}:\n${e} \n\n ${e.stack}`);
+            }
+        };
+    }
+
+    /**
+     * Called when the project is loaded
+     * @param  {[type]} data Event info from the project unloaded event
+     */
+    projectLoaded(ev: Editor.EditorEvents.LoadProjectEvent) {
+        // Need to use a for loop and don't cache the length because the list of services *may* change while processing.  Extensions could be appended to the end
+        for (let i = 0; i < this.registeredServices.length; i++) {
+            let service = this.registeredServices[i];
+            try {
+                // Notify services that the project has just been loaded
+                if (service.projectLoaded) {
+                    service.projectLoaded(ev);
+                }
+            } catch (e) {
+                EditorUI.showModalError("Extension Error", `Error detected in extension ${service.name}:\n${e}\n\n ${e.stack}`);
+            }
+        };
+    }
+
+    playerStarted() {
+        this.registeredServices.forEach((service) => {
+            try {
+                // Notify services that the project has just been loaded
+                if (service.playerStarted) {
+                    service.playerStarted();
+                }
+            } catch (e) {
+                EditorUI.showModalError("Extension Error", `Error detected in extension ${service.name}\n \n ${e.stack}`);
+            }
+        });
+    }
+}
+
+/**
+ * Registry for service extensions that are concerned about Resources
+ */
+export class ResourceServicesProvider extends ServicesProvider<Editor.HostExtensions.ResourceServicesEventListener> implements Editor.HostExtensions.ResourceServicesProvider {
+    constructor() {
+        super();
+    }
+
+    /**
+     * Allow this service registry to subscribe to events that it is interested in
+     * @param  {Atomic.UIWidget} topLevelWindow The top level window that will be receiving these events
+     */
+    subscribeToEvents(eventDispatcher: Editor.Extensions.EventDispatcher) {
+        eventDispatcher.subscribeToEvent(EditorEvents.SaveResourceNotification, (ev) => this.saveResource(ev));
+        eventDispatcher.subscribeToEvent(EditorEvents.DeleteResourceNotification, (ev) => this.deleteResource(ev));
+        eventDispatcher.subscribeToEvent(EditorEvents.RenameResourceNotification, (ev) => this.renameResource(ev));
+    }
+
+    /**
+     * Called after a resource has been saved
+     * @param  {Editor.EditorEvents.SaveResourceEvent} ev
+     */
+    saveResource(ev: Editor.EditorEvents.SaveResourceEvent) {
+        // run through and find any services that can handle this.
+        this.registeredServices.forEach((service) => {
+            try {
+                // Verify that the service contains the appropriate methods and that it can save
+                if (service.save) {
+                    service.save(ev);
+                }
+            } catch (e) {
+                EditorUI.showModalError("Extension Error", `Error detected in extension ${service.name}:\n${e}\n\n ${e.stack}`);
+            }
+        });
+    }
+
+    /**
+     * Called when a resource has been deleted
+     */
+    deleteResource(ev: Editor.EditorEvents.DeleteResourceEvent) {
+        this.registeredServices.forEach((service) => {
+            try {
+                // Verify that the service contains the appropriate methods and that it can delete
+                if (service.delete) {
+                    service.delete(ev);
+                }
+            } catch (e) {
+                EditorUI.showModalError("Extension Error", `Error detected in extension ${service.name}:\n${e}\n\n ${e.stack}`);
+            }
+        });
+    }
+
+    /**
+     * Called when a resource has been renamed
+     * @param  {Editor.EditorEvents.RenameResourceEvent} ev
+     */
+    renameResource(ev: Editor.EditorEvents.RenameResourceEvent) {
+        this.registeredServices.forEach((service) => {
+            try {
+                // Verify that the service contains the appropriate methods and that it can handle the rename
+                if (service.rename) {
+                    service.rename(ev);
+                }
+            } catch (e) {
+                EditorUI.showModalError("Extension Error", `Error detected in extension ${service.name}:\n${e}\n\n ${e.stack}`);
+            }
+        });
+    }
+
+}
+
+/**
+ * Registry for service extensions that are concerned about and need access to parts of the editor user interface
+ * Note: we may want to move this out into it's own file since it has a bunch of editor dependencies
+ */
+export class UIServicesProvider extends ServicesProvider<Editor.HostExtensions.UIServicesEventListener> implements Editor.HostExtensions.UIServicesProvider {
+    constructor() {
+        super();
+    }
+
+    private mainFrameMenu: MainFramMenu = null;
+    private hierarchyFrameMenu: HierarchyFrameMenu = null;
+    private projectFrameMenu: ProjectFrameMenu = null;
+    private modalOps: ModalOps;
+
+    init(mainFrameMenu: MainFramMenu, hierarchyFrameMenu: HierarchyFrameMenu, projectFrameMenu: ProjectFrameMenu, modalOps: ModalOps) {
+        // Only set these once
+        if (this.mainFrameMenu == null) {
+            this.mainFrameMenu = mainFrameMenu;
+        }
+        if (this.hierarchyFrameMenu == null) {
+            this.hierarchyFrameMenu = hierarchyFrameMenu;
+        }
+        if (this.projectFrameMenu == null) {
+            this.projectFrameMenu = projectFrameMenu;
+        }
+        if (this.modalOps == null) {
+            this.modalOps = modalOps;
+        }
+    }
+
+    /**
+     * Adds a new menu to the plugin menu
+     * @param  {string} id
+     * @param  {any} items
+     * @return {Atomic.UIMenuItemSource}
+     */
+    createPluginMenuItemSource(id: string, items: any): Atomic.UIMenuItemSource {
+        return this.mainFrameMenu.createPluginMenuItemSource(id, items);
+    }
+
+    /**
+     * Removes a previously added menu from the plugin menu
+     * @param  {string} id
+     */
+    removePluginMenuItemSource(id: string) {
+        this.mainFrameMenu.removePluginMenuItemSource(id);
+    }
+
+    /**
+     * Adds a new menu to the hierarchy context menu
+     * @param  {string} id
+     * @param  {any} items
+     * @return {Atomic.UIMenuItemSource}
+     */
+    createHierarchyContextMenuItemSource(id: string, items: any): Atomic.UIMenuItemSource {
+        return this.hierarchyFrameMenu.createPluginItemSource(id, items);
+    }
+
+    /**
+     * Removes a previously added menu from the hierarchy context menu
+     * @param  {string} id
+     */
+    removeHierarchyContextMenuItemSource(id: string) {
+        this.hierarchyFrameMenu.removePluginItemSource(id);
+    }
+
+    /**
+     * Adds a new menu to the project context menu
+     * @param  {string} id
+     * @param  {any} items
+     * @return {Atomic.UIMenuItemSource}
+     */
+    createProjectContextMenuItemSource(id: string, items: any): Atomic.UIMenuItemSource {
+        return this.projectFrameMenu.createPluginItemSource(id, items);
+    }
+
+    /**
+     * Removes a previously added menu from the project context menu
+     * @param  {string} id
+     */
+    removeProjectContextMenuItemSource(id: string) {
+        this.projectFrameMenu.removePluginItemSource(id);
+    }
+
+    /**
+     * Disaplays a modal window
+     * @param  {Editor.Modal.ModalWindow} window
+     */
+    showModalWindow(windowText: string, uifilename: string, handleWidgetEventCB: (ev: Atomic.UIWidgetEvent) => void): Editor.Modal.ExtensionWindow {
+        return this.modalOps.showExtensionWindow(windowText, uifilename, handleWidgetEventCB);
+    }
+
+    /**
+     * Called when a menu item has been clicked
+     * @param  {string} refId
+     * @type {boolean} return true if handled
+     */
+    menuItemClicked(refid: string): boolean {
+        // run through and find any services that can handle this.
+        return this.registeredServices.some((service) => {
+            try {
+                // Verify that the service contains the appropriate methods and that it can handle it
+                if (service.menuItemClicked) {
+                    if (service.menuItemClicked(refid)) {
+                        return true;
+                    }
+                }
+            } catch (e) {
+               EditorUI.showModalError("Extension Error", `Error detected in extension ${service.name}:\n${e}\n\n ${e.stack}`);
+            }
+        });
+    }
+
+    /**
+     * Called when a context menu item in the hierarchy pane has been clicked
+     * @param  {Atomic.Node} node
+     * @param  {string} refId
+     * @type {boolean} return true if handled
+     */
+    hierarchyContextItemClicked(node: Atomic.Node, refid: string): boolean {
+        if (!node) 
+            return false;
+
+        // run through and find any services that can handle this.
+        return this.registeredServices.some((service) => {
+            try {
+                // Verify that the service contains the appropriate methods and that it can handle it
+                if (service.hierarchyContextItemClicked) {
+                    if (service.hierarchyContextItemClicked(node, refid)) {
+                        return true;
+                    }
+                }
+            } catch (e) {
+               EditorUI.showModalError("Extension Error", `Error detected in extension ${service.name}:\n${e}\n\n ${e.stack}`);
+            }
+        });
+    }
+
+
+    /**
+     * Called when a context menu item in the hierarchy pane has been clicked
+     * @param  {ToolCore.Asset} asset
+     * @param  {string} refId
+     * @type {boolean} return true if handled
+     */
+    projectContextItemClicked(asset: ToolCore.Asset, refid: string): boolean {
+        if (!asset)
+            return false;
+
+        // run through and find any services that can handle this.
+        return this.registeredServices.some((service) => {
+            try {
+                // Verify that the service contains the appropriate methods and that it can handle it
+                if (service.projectContextItemClicked) {
+                    if (service.projectContextItemClicked(asset, refid)) {
+                        return true;
+                    }
+                }
+            } catch (e) {
+               EditorUI.showModalError("Extension Error", `Error detected in extension ${service.name}:\n${e}\n\n ${e.stack}`);
+            }
+        });
+    }
+
+    /**
+     * Allow this service registry to subscribe to events that it is interested in
+     * @param  {Atomic.UIWidget} topLevelWindow The top level window that will be receiving these events
+     */
+    subscribeToEvents(eventDispatcher: Editor.Extensions.EventDispatcher) {
+        // Placeholder for when UI events published by the editor need to be listened for
+        //eventDispatcher.subscribeToEvent(EditorEvents.SaveResourceNotification, (ev) => this.doSomeUiMessage(ev));
+    }
+}

+ 93 - 0
Script/AtomicEditor/hostExtensions/ServiceLocator.ts

@@ -0,0 +1,93 @@
+//
+// 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 * as HostExtensionServices from "./HostExtensionServices";
+import * as EditorUI from "../ui/EditorUI";
+import ProjectBasedExtensionLoader from "./coreExtensions/ProjectBasedExtensionLoader";
+import TypescriptLanguageExtension from "./languageExtensions/TypscriptLanguageExtension";
+
+/**
+ * Generic service locator of editor services that may be injected by either a plugin
+ * or by the editor itself.
+ */
+export class ServiceLocatorType implements Editor.HostExtensions.HostServiceLocator {
+
+    constructor() {
+        this.resourceServices = new HostExtensionServices.ResourceServicesProvider();
+        this.projectServices = new HostExtensionServices.ProjectServicesProvider();
+        this.uiServices = new HostExtensionServices.UIServicesProvider();
+    }
+
+    private eventDispatcher: Atomic.UIWidget = null;
+
+    resourceServices: HostExtensionServices.ResourceServicesProvider;
+    projectServices: HostExtensionServices.ProjectServicesProvider;
+    uiServices: HostExtensionServices.UIServicesProvider;
+
+    loadService(service: Editor.HostExtensions.HostEditorService) {
+        try {
+            service.initialize(this);
+        } catch (e) {
+            EditorUI.showModalError("Extension Error", `Error detected in extension ${service.name}:\n${e}\n\n ${e.stack}`);
+        }
+    }
+
+    /**
+     * This is where the top level window will allow the service locator to listen for events and act on them.
+     * @param  {Atomic.UIWidget} frame
+     */
+    subscribeToEvents(frame: Atomic.UIWidget) {
+        this.eventDispatcher = frame;
+        this.resourceServices.subscribeToEvents(this);
+        this.projectServices.subscribeToEvents(this);
+        this.uiServices.subscribeToEvents(this);
+    }
+
+    /**
+     * Send a custom event.  This can be used by services to publish custom events
+     * @param  {string} eventType
+     * @param  {any} data
+     */
+    sendEvent(eventType: string, data: any) {
+        if (this.eventDispatcher) {
+            this.eventDispatcher.sendEvent(eventType, data);
+        }
+    }
+
+    /**
+     * Subscribe to an event and provide a callback.  This can be used by services to subscribe to custom events
+     * @param  {string} eventType
+     * @param  {any} callback
+     */
+    subscribeToEvent(eventType: string, callback: (data: any) => void) {
+        if (this.eventDispatcher) {
+            this.eventDispatcher.subscribeToEvent(eventType, callback);
+        }
+    }
+}
+// Singleton service locator that can be referenced
+const serviceLocator = new ServiceLocatorType();
+export default serviceLocator;
+
+// Load up all the internal services
+serviceLocator.loadService(new ProjectBasedExtensionLoader());
+serviceLocator.loadService(new TypescriptLanguageExtension());

+ 135 - 0
Script/AtomicEditor/hostExtensions/coreExtensions/ProjectBasedExtensionLoader.ts

@@ -0,0 +1,135 @@
+//
+// 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.
+//
+
+/// <reference path="../../../TypeScript/duktape.d.ts" />
+
+import * as EditorEvents from "../../editor/EditorEvents";
+
+/**
+ * Resource extension that supports the web view typescript extension
+ */
+export default class ProjectBasedExtensionLoader implements Editor.HostExtensions.ProjectServicesEventListener {
+    name: string = "ProjectBasedExtensionLoader";
+    description: string = "This service supports loading extensions that reside in the project under {ProjectRoot}/Editor and named '*.Service.js'.";
+
+    private serviceRegistry: Editor.HostExtensions.HostServiceLocator = null;
+    private modSearchRewritten = false;
+
+    /**
+     * Prefix to use to detect "special" require paths
+     * @type {String}
+     */
+    private static duktapeRequirePrefix = "project:";
+
+    /**
+     * Inject this language service into the registry
+     * @return {[type]}             True if successful
+     */
+    initialize(serviceLocator: Editor.HostExtensions.HostServiceLocator) {
+
+        // Let's rewrite the mod search
+        this.rewriteModSearch();
+
+        // We care project events
+        serviceLocator.projectServices.register(this);
+        this.serviceRegistry = serviceLocator;
+    }
+
+    /**
+     * Rewrite the duktape modSearch routine so that we can intercept any
+     * require calls with a "project:" prefix.  Duktape will fail if it receives
+     * a require call with a fully qualified path starting with a "/" (at least on OSX and Linux),
+     * so we will need to detect any of these project level requires and allow Atomic to go to the
+     * file system and manually pull these in to provide to duktape
+     */
+    private rewriteModSearch() {
+        Duktape.modSearch = (function(origModSearch) {
+            return function(id: string, require, exports, module) {
+                let system = ToolCore.getToolSystem();
+                if (id.indexOf(ProjectBasedExtensionLoader.duktapeRequirePrefix) == 0) {
+                    let path = id.substr(ProjectBasedExtensionLoader.duktapeRequirePrefix.length) + ".js";
+
+                    // For safety, only allow bringing modules in from the project directory.  This could be
+                    // extended to look for some global extension directory to pull extensions from such as
+                    // ~/.atomicExtensions/...
+                    if (system.project && path.indexOf(system.project.projectPath) == 0) {
+                        console.log(`Searching for project based include: ${path}`);
+                        // we have a project based require
+                        if (Atomic.fileSystem.fileExists(path)) {
+                            let include = new Atomic.File(path, Atomic.FILE_READ);
+                            try {
+                                return include.readText();
+                            } finally {
+                                include.close();
+                            }
+                        } else {
+                            throw new Error(`Cannot find project module: ${path}`);
+                        }
+                    } else {
+                        throw new Error(`Extension at ${path} does not reside in the project directory ${system.project.projectPath}`);
+                    }
+                } else {
+                    return origModSearch(id, require, exports, module);
+                }
+            };
+        })(Duktape.modSearch);
+    }
+    /**
+     * Called when the project is being loaded to allow the typscript language service to reset and
+     * possibly compile
+     */
+    projectLoaded(ev: Editor.EditorEvents.LoadProjectEvent) {
+        // got a load, we need to reset the language service
+        console.log(`${this.name}: received a project loaded event for project at ${ev.path}`);
+        let system = ToolCore.getToolSystem();
+        if (system.project) {
+            let fileSystem = Atomic.getFileSystem();
+            let editorScriptsPath = Atomic.addTrailingSlash(system.project.resourcePath) + "EditorData/";
+            if (fileSystem.dirExists(editorScriptsPath)) {
+                let filenames = fileSystem.scanDir(editorScriptsPath, "*.js", Atomic.SCAN_FILES, true);
+                filenames.forEach((filename) => {
+                    // Filtered search in Atomic doesn't due true wildcarding, only handles extension filters
+                    // in the future this may be better handled with some kind of manifest file
+                    if (filename.toLowerCase().lastIndexOf(".plugin.js") >= 0) {
+                        var extensionPath = editorScriptsPath + filename;
+                        extensionPath = extensionPath.substring(0, extensionPath.length - 3);
+
+                        console.log(`Detected project extension at: ${extensionPath} `);
+                        // Note: duktape does not yet support unloading modules,
+                        // but will return the same object when passed a path the second time.
+                        let resourceServiceModule = require(ProjectBasedExtensionLoader.duktapeRequirePrefix + extensionPath);
+
+                        // Handle situation where the service is either exposed by a typescript default export
+                        // or as the module.export (depends on if it is being written in typescript, javascript, es6, etc.)
+                        let resourceService: Editor.HostExtensions.HostEditorService = null;
+                        if (resourceServiceModule.default) {
+                            resourceService = resourceServiceModule.default;
+                        } else {
+                            resourceService = resourceServiceModule;
+                        }
+                        this.serviceRegistry.loadService(resourceService);
+                    }
+                });
+            }
+        }
+    }
+}

+ 201 - 0
Script/AtomicEditor/hostExtensions/languageExtensions/TypscriptLanguageExtension.ts

@@ -0,0 +1,201 @@
+//
+// 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 * as EditorEvents from "../../editor/EditorEvents";
+
+/**
+ * Resource extension that supports the web view typescript extension
+ */
+export default class TypescriptLanguageExtension implements Editor.HostExtensions.ResourceServicesEventListener, Editor.HostExtensions.ProjectServicesEventListener {
+    name: string = "HostTypeScriptLanguageExtension";
+    description: string = "This service supports the typscript webview extension.";
+
+    /**
+     * Indicates if this project contains typescript files.
+     * @type {Boolean}
+     */
+    private isTypescriptProject = false;
+    private serviceRegistry: Editor.HostExtensions.HostServiceLocator = null;
+    /**
+     * Determines if the file name/path provided is something we care about
+     * @param  {string} path
+     * @return {boolean}
+     */
+    private isValidFiletype(path: string): boolean {
+        if (this.isTypescriptProject) {
+            const ext = Atomic.getExtension(path);
+            if (ext == ".ts") {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Seed the language service with all of the relevant files in the project.  This updates the tsconifg.atomic file in
+     * the root of the resources directory.
+     */
+    private loadProjectFiles() {
+        let projectFiles: Array<string> = [];
+
+        //scan all the files in the project for any typescript files so we can determine if this is a typescript project
+        Atomic.fileSystem.scanDir(ToolCore.toolSystem.project.resourcePath, "*.ts", Atomic.SCAN_FILES, true).forEach(filename => {
+            projectFiles.push(Atomic.addTrailingSlash(ToolCore.toolSystem.project.resourcePath) + filename);
+            this.isTypescriptProject = true;
+        });
+
+        // only build out a tsconfig.atomic if we actually have typescript files in the project
+        if (this.isTypescriptProject) {
+            // First we need to load in a copy of the lib.core.d.ts that is necessary for the hosted typescript compiler
+            projectFiles.push(Atomic.addTrailingSlash(Atomic.addTrailingSlash(ToolCore.toolEnvironment.toolDataDir) + "TypeScriptSupport") + "lib.core.d.ts");
+
+            // Load up a copy of the duktape.d.ts
+            projectFiles.push(Atomic.addTrailingSlash(Atomic.addTrailingSlash(ToolCore.toolEnvironment.toolDataDir) + "TypeScriptSupport") + "duktape.d.ts");
+
+
+            // Look in a 'typings' directory for any typescript definition files
+            const typingsDir = Atomic.addTrailingSlash(ToolCore.toolSystem.project.projectPath) + "typings";
+            Atomic.fileSystem.scanDir(typingsDir, "*.d.ts", Atomic.SCAN_FILES, true).forEach(filename => {
+                projectFiles.push(Atomic.addTrailingSlash(typingsDir) + filename);
+            });
+
+            let files = projectFiles.map((f: string) => {
+                if (f.indexOf(ToolCore.toolSystem.project.resourcePath) != -1) {
+                    // if we are in the resources directory, just pass back the path from resources down
+                    return f.replace(Atomic.addTrailingSlash(ToolCore.toolSystem.project.projectPath), "");
+                } else {
+                    // otherwise return the full path
+                    return f;
+                }
+            });
+
+            let tsConfig = {
+                files: files
+            };
+
+            let filename = Atomic.addTrailingSlash(ToolCore.toolSystem.project.resourcePath) + "tsconfig.atomic";
+            let script = new Atomic.File(filename, Atomic.FILE_WRITE);
+            try {
+                script.writeString(JSON.stringify(tsConfig));
+                script.flush();
+            } finally {
+                script.close();
+            }
+        }
+    }
+
+    /**
+     * Inject this language service into the registry
+     * @return {[type]}             True if successful
+     */
+    initialize(serviceLocator: Editor.HostExtensions.HostServiceLocator) {
+        // We care about both resource events as well as project events
+        serviceLocator.resourceServices.register(this);
+        serviceLocator.projectServices.register(this);
+        this.serviceRegistry = serviceLocator;
+    }
+
+    /**
+     * Handle the delete.  This should delete the corresponding javascript file
+     * @param  {Editor.EditorEvents.DeleteResourceEvent} ev
+     */
+    delete(ev: Editor.EditorEvents.DeleteResourceEvent) {
+        if (this.isValidFiletype(ev.path)) {
+            console.log(`${this.name}: received a delete resource event`);
+
+            // Delete the corresponding js file
+            let jsFile = ev.path.replace(/\.ts$/, ".js");
+            let jsFileAsset = ToolCore.assetDatabase.getAssetByPath(jsFile);
+            if (jsFileAsset) {
+                console.log(`${this.name}: deleting corresponding .js file`);
+                ToolCore.assetDatabase.deleteAsset(jsFileAsset);
+
+                let eventData: EditorEvents.DeleteResourceEvent = {
+                    path: jsFile
+                };
+
+                this.serviceRegistry.sendEvent(EditorEvents.DeleteResourceNotification, eventData);
+
+                // rebuild the tsconfig.atomic
+                this.loadProjectFiles();
+            }
+        }
+    }
+
+    /**
+     * Handle the rename.  Should rename the corresponding .js file
+     * @param  {Editor.EditorEvents.RenameResourceEvent} ev
+     */
+    rename(ev: Editor.EditorEvents.RenameResourceEvent) {
+        if (this.isValidFiletype(ev.path)) {
+            console.log(`${this.name}: received a rename resource event`);
+
+            // Rename the corresponding js file
+            let jsFile = ev.path.replace(/\.ts$/, ".js");
+            let jsFileNew = ev.newPath.replace(/\.ts$/, ".js"); // rename doesn't want extension
+            let jsFileAsset = ToolCore.assetDatabase.getAssetByPath(jsFile);
+            if (jsFileAsset) {
+                console.log(`${this.name}: renaming corresponding .js file`);
+                jsFileAsset.rename(ev.newName);
+
+                let eventData: EditorEvents.RenameResourceEvent = {
+                    path: jsFile,
+                    newPath: jsFileNew,
+                    newName: ev.newName,
+                    asset: jsFileAsset
+                };
+
+                this.serviceRegistry.sendEvent(EditorEvents.RenameResourceNotification, eventData);
+
+                // rebuild the tsconfig.atomic
+                this.loadProjectFiles();
+            }
+        }
+    }
+
+    /**
+     * Handles the save event and detects if a typescript file has been added to a non-typescript project
+     * @param  {Editor.EditorEvents.SaveResourceEvent} ev
+     * @return {[type]}
+     */
+    save(ev: Editor.EditorEvents.SaveResourceEvent) {
+        // let's check to see if we have created a typescript file
+        if (!this.isTypescriptProject) {
+            if (Atomic.getExtension(ev.path) == ".ts") {
+                this.isTypescriptProject = true;
+                this.loadProjectFiles();
+            }
+        }
+    }
+
+    /*** ProjectService implementation ****/
+
+    /**
+     * Called when the project is being loaded to allow the typscript language service to reset and
+     * possibly compile
+     */
+    projectLoaded(ev: Editor.EditorEvents.LoadProjectEvent) {
+        // got a load, we need to reset the language service
+        console.log(`${this.name}: received a project loaded event for project at ${ev.path}`);
+        this.loadProjectFiles();
+    }
+}

+ 19 - 4
Script/AtomicEditor/main.ts

@@ -1,8 +1,23 @@
 //
-// 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.
 //
 
 /// <reference path="../TypeScript/Atomic.d.ts" />

+ 22 - 0
Script/AtomicEditor/resources/ProjectTemplates.ts

@@ -1,3 +1,25 @@
+//
+// 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 EditorUI = require("../ui/EditorUI");
 /**
  * Interface around a project template

+ 19 - 4
Script/AtomicEditor/resources/ResourceOps.ts

@@ -1,8 +1,23 @@
 //
-// 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 EditorEvents = require("../editor/EditorEvents");

+ 61 - 0
Script/AtomicEditor/resources/SearchBarFiltering.ts

@@ -0,0 +1,61 @@
+//
+// 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.
+//
+
+export class UISearchBar {
+    searchPopulate(searchText: string, compareText: string): boolean {
+
+        var equal = false;
+
+        searchText = searchText.toUpperCase();
+        compareText = compareText.toUpperCase();
+
+        for (var i = 0; i < compareText.length; i++) {
+
+            if (compareText[i] == searchText[0]) {
+                var j = 0;
+                var k = i;
+
+                while (k < compareText.length && j < searchText.length) {
+
+                    if (compareText[k] == searchText[j]) {
+                        equal = true;
+                    } else {
+                        equal = false;
+                        break;
+                    }
+                    j++;
+                    k++;
+                }
+
+                if (j != searchText.length) {
+                    equal = false;
+                }
+
+                if (equal) {
+                    break;
+                }
+            }
+        }
+
+        return equal;
+    }
+}

+ 19 - 4
Script/AtomicEditor/ui/EditorStrings.ts

@@ -1,8 +1,23 @@
 //
-// 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.
 //
 
 export enum StringID {

+ 28 - 4
Script/AtomicEditor/ui/EditorUI.ts

@@ -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 EditorEvents = require("editor/EditorEvents");
 import MainFrame = require("./frames/MainFrame");
 import ModalOps = require("./modal/ModalOps");
 import Shortcuts = require("./Shortcuts");
+import ServiceLocator from "../hostExtensions/ServiceLocator";
 
 // this is designed with public get functions to solve
 // circular dependency issues in TS
@@ -79,6 +95,14 @@ class EditorUI extends Atomic.ScriptObject {
     this.modalOps = new ModalOps();
     this.shortcuts = new Shortcuts();
 
+    // Hook the service locator into the event system and give it the ui objects it needs
+    ServiceLocator.uiServices.init(
+      this.mainframe.menu, 
+      this.mainframe.hierarchyFrame.menu,
+      this.mainframe.projectframe.menu,
+      this.modalOps);
+    ServiceLocator.subscribeToEvents(this.mainframe);
+
     this.subscribeToEvent(EditorEvents.ModalError, (event:EditorEvents.ModalErrorEvent) => {
       this.showModalError(event.title, event.message);
     });

+ 19 - 4
Script/AtomicEditor/ui/MainToolbar.ts

@@ -1,8 +1,23 @@
 //
-// 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 EditorUI = require("./EditorUI");

+ 19 - 4
Script/AtomicEditor/ui/ScriptWidget.ts

@@ -1,8 +1,23 @@
 //
-// 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.
 //
 
 class ScriptWidget extends Atomic.UIWidget {

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

@@ -1,8 +1,23 @@
 //
-// 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 EditorEvents = require("../editor/EditorEvents");

+ 19 - 4
Script/AtomicEditor/ui/UIEvents.ts

@@ -1,8 +1,23 @@
 //
-// 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.
 //
 
 export const MessageModalEvent = "MessageModalEvent";

+ 89 - 6
Script/AtomicEditor/ui/frames/HierarchyFrame.ts

@@ -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 HierarchyFrameMenu = require("./menus/HierarchyFrameMenu");
 import MenuItemSources = require("./menus/MenuItemSources");
 import EditorEvents = require("editor/EditorEvents");
 import EditorUI = require("ui/EditorUI");
+import SearchBarFiltering = require("resources/SearchBarFiltering");
 
 var IconTemporary = "ComponentBitmap";
 
@@ -19,6 +35,10 @@ class HierarchyFrame extends Atomic.UIWidget {
     hierList: Atomic.UIListView;
     menu: HierarchyFrameMenu;
     nodeIDToItemID = {};
+    uiSearchBar: SearchBarFiltering.UISearchBar = new SearchBarFiltering.UISearchBar();
+    search: boolean = false;
+    searchEdit: Atomic.UIEditField;
+    selectedNode: Atomic.Node;
 
     constructor(parent: Atomic.UIWidget) {
 
@@ -30,6 +50,8 @@ class HierarchyFrame extends Atomic.UIWidget {
 
         this.gravity = Atomic.UI_GRAVITY_TOP_BOTTOM;
 
+        this.searchEdit = <Atomic.UIEditField>this.getWidget("filter");
+
         var hierarchycontainer = parent.getWidget("hierarchycontainer");
         hierarchycontainer.addChild(this);
 
@@ -123,6 +145,21 @@ class HierarchyFrame extends Atomic.UIWidget {
 
         });
 
+        // Activates search while user is typing in search widget
+        this.searchEdit.subscribeToEvent(this.searchEdit, "WidgetEvent", (data) => {
+            if (!ToolCore.toolSystem.project) return;
+
+            if (data.type == Atomic.UI_EVENT_TYPE_KEY_UP) {
+                this.search = true;
+                this.populate();
+
+                if (this.searchEdit.text == "" && this.selectedNode) {
+                        this.hierList.selectItemByID(this.selectedNode.id.toString(), true);    //maintains selected item after search is cancelled
+                }
+
+            }
+        });
+
     }
 
     handleSceneEditNodeAdded(ev: Editor.SceneEditNodeAddedEvent) {
@@ -245,6 +282,25 @@ class HierarchyFrame extends Atomic.UIWidget {
 
     }
 
+    // Searches folders within folders recursively
+    searchHierarchyFolder(asset: Atomic.Node, parentID: number, searchText: string) {
+
+        for (var i = 0; i < asset.getNumChildren(false); i++) {
+
+            var childAsset = asset.getChildAtIndex(i);
+
+            if (this.uiSearchBar.searchPopulate(searchText, childAsset.name)) {
+                this.recursiveAddNode(parentID, childAsset);
+            }
+
+            if (childAsset.getNumChildren(false) > 0) {
+                this.searchHierarchyFolder(childAsset, parentID, searchText);
+            }
+
+        }
+    }
+
+    // Populates frame when the search bar is used
     populate() {
 
         this.nodeIDToItemID = {};
@@ -257,10 +313,15 @@ class HierarchyFrame extends Atomic.UIWidget {
 
         this.nodeIDToItemID[this.scene.id] = parentID;
 
-        for (var i = 0; i < this.scene.getNumChildren(false); i++) {
+        var asset = this.scene;
 
-            this.recursiveAddNode(parentID, this.scene.getChildAtIndex(i));
+        if (this.searchEdit.text == "" || !this.search) {
+            for (var i = 0; i < this.scene.getNumChildren(false); i++) {
+                this.recursiveAddNode(parentID, this.scene.getChildAtIndex(i));
+            }
 
+        } else if (this.search) {
+            this.searchHierarchyFolder(asset, parentID, this.searchEdit.text);
         }
 
         this.hierList.rootList.value = -1;
@@ -270,6 +331,9 @@ class HierarchyFrame extends Atomic.UIWidget {
 
     handleDragEnded(ev: Atomic.DragEndedEvent) {
 
+        if (!ev.dragObject.object)
+            return;
+
         var typeName = ev.dragObject.object.typeName;
 
         var dropNode: Atomic.Node = this.scene.getNode(Number(this.hierList.hoverItemID));
@@ -297,6 +361,7 @@ class HierarchyFrame extends Atomic.UIWidget {
 
     handleSceneNodeSelected(ev: Editor.SceneNodeSelectedEvent) {
 
+        this.selectedNode = ev.node;    //Stores selection for when the search is cancelled
         this.hierList.selectItemByID(ev.node.id.toString(), ev.selected);
 
     }
@@ -372,6 +437,24 @@ class HierarchyFrame extends Atomic.UIWidget {
 
             }
 
+            // cancel search
+            if (id == "cancel search") {
+
+                if (!this.scene) {
+                    this.searchEdit.text = "";
+                    return;
+                }
+
+                if (!ToolCore.toolSystem.project) return;
+                this.searchEdit.text = "";
+                this.populate();
+                this.search = false;
+
+                if (this.selectedNode) {
+                    this.hierList.selectItemByID(this.selectedNode.id.toString(), true);    //maintains selected item after search is cancelled
+                }
+            }
+
 
         } else if (data.type == Atomic.UI_EVENT_TYPE_RIGHT_POINTER_UP) {
 

+ 21 - 5
Script/AtomicEditor/ui/frames/MainFrame.ts

@@ -1,8 +1,23 @@
 //
-// 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 ProjectFrame = require("./ProjectFrame");
@@ -18,6 +33,7 @@ import ScriptWidget = require("ui/ScriptWidget");
 import MainFrameMenu = require("./menus/MainFrameMenu");
 
 import MenuItemSources = require("./menus/MenuItemSources");
+import * as EditorEvents from "../../editor/EditorEvents";
 
 class MainFrame extends ScriptWidget {
 
@@ -53,7 +69,7 @@ class MainFrame extends ScriptWidget {
             this.enableProjectMenus();
         });
 
-        this.subscribeToEvent("ProjectUnloaded", (data) => {
+        this.subscribeToEvent(EditorEvents.ProjectUnloadedNotification, (data) => {
             this.showWelcomeFrame(true);
             this.disableProjectMenus();
         });

+ 79 - 15
Script/AtomicEditor/ui/frames/ProjectFrame.ts

@@ -1,8 +1,23 @@
 //
-// 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 ScriptWidget = require("ui/ScriptWidget");
@@ -10,6 +25,7 @@ import Editor = require("editor/Editor");
 import EditorEvents = require("editor/EditorEvents");
 import ProjectFrameMenu = require("./menus/ProjectFrameMenu");
 import MenuItemSources = require("./menus/MenuItemSources");
+import SearchBarFiltering = require("resources/SearchBarFiltering");
 
 class ProjectFrame extends ScriptWidget {
 
@@ -23,6 +39,9 @@ class ProjectFrame extends ScriptWidget {
     currentReferencedButton: Atomic.UIButton = null;
     containerScrollToHeight: number;
     containerScrollToHeightCounter: number;
+    uiSearchBar: SearchBarFiltering.UISearchBar = new SearchBarFiltering.UISearchBar();
+    search: boolean = false;
+    searchEdit: Atomic.UIEditField;
 
     constructor(parent: Atomic.UIWidget) {
 
@@ -34,6 +53,8 @@ class ProjectFrame extends ScriptWidget {
 
         this.gravity = Atomic.UI_GRAVITY_TOP_BOTTOM;
 
+        this.searchEdit = <Atomic.UIEditField>this.getWidget("filter");
+
         var projectviewcontainer = parent.getWidget("projectviewcontainer");
 
         projectviewcontainer.addChild(this);
@@ -48,7 +69,7 @@ class ProjectFrame extends ScriptWidget {
 
         // events
         this.subscribeToEvent("ProjectLoaded", (data) => this.handleProjectLoaded(data));
-        this.subscribeToEvent("ProjectUnloaded", (data) => this.handleProjectUnloaded(data));
+        this.subscribeToEvent(EditorEvents.ProjectUnloadedNotification, (data) => this.handleProjectUnloaded(data));
         this.subscribeToEvent("DragEnded", (data: Atomic.DragEndedEvent) => this.handleDragEnded(data));
 
         this.subscribeToEvent("ResourceAdded", (ev: ToolCore.ResourceAddedEvent) => this.handleResourceAdded(ev));
@@ -67,6 +88,17 @@ class ProjectFrame extends ScriptWidget {
 
         });
 
+        // Activates search while user is typing in search widget
+        this.searchEdit.subscribeToEvent(this.searchEdit, "WidgetEvent", (data) => {
+
+            if (!ToolCore.toolSystem.project) return;
+
+            if (data.type == Atomic.UI_EVENT_TYPE_KEY_UP) {
+                this.search = true;
+                this.refreshContent(this.currentFolder);
+            }
+        });
+
     }
 
     handleAssetRenamed(ev: ToolCore.AssetRenamedEvent) {
@@ -167,6 +199,12 @@ class ProjectFrame extends ScriptWidget {
 
             var id = data.target.id;
 
+            // cancel search - goes back to the last selected folder
+            if (id == "cancel search") {
+                if (!ToolCore.toolSystem.project) return;
+                this.searchEdit.text = "";
+                this.refreshContent(this.currentFolder);
+            }
 
             if (this.menu.handlePopupMenu(data.target, data.refid))
                 return true;
@@ -403,6 +441,26 @@ class ProjectFrame extends ScriptWidget {
         this.folderList.scrollToSelectedItem();
     }
 
+    // Searches folders within folders recursively
+    searchProjectFolder(folderPath: string, container: Atomic.UILayout, searchText: string, db: ToolCore.AssetDatabase) {
+
+        if (folderPath == "")
+            return;
+
+        var assets = db.getFolderAssets(folderPath);
+
+        for (var i in assets) {
+
+            var childAsset = assets[i];
+
+            if (childAsset.isFolder()) {
+                this.searchProjectFolder(childAsset.path, container, searchText, db);
+            } else if (this.uiSearchBar.searchPopulate(searchText, childAsset.name + childAsset.extension)) {
+                container.addChild(this.createButtonLayout(childAsset));
+            }
+        }
+    }
+
     private refreshContent(folder: ToolCore.Asset) {
 
         if (this.currentFolder != folder) {
@@ -418,20 +476,26 @@ class ProjectFrame extends ScriptWidget {
         var container: Atomic.UILayout = <Atomic.UILayout>this.getWidget("contentcontainer");
         container.deleteAllChildren();
 
-        var assets = db.getFolderAssets(folder.path);
+        if (this.currentFolder != null) {
+            var assets = db.getFolderAssets(folder.path);
 
-        this.containerScrollToHeightCounter = 0;
+            this.containerScrollToHeightCounter = 0;
 
-        for (var i in assets) {
+            if (this.searchEdit.text == "" || !this.search) {
 
-            var asset = assets[i];
-            container.addChild(this.createButtonLayout(asset));
-            this.containerScrollToHeightCounter++;
+                for (var i in assets) {
+                    var asset = assets[i];
+                    container.addChild(this.createButtonLayout(asset));
+                    this.containerScrollToHeightCounter++;
+                }
+            } else if (this.search) {
+                this.searchProjectFolder(this.resourceFolder.path, container, this.searchEdit.text, db);
+            }
         }
-       
+
         var containerScroll: Atomic.UIScrollContainer = <Atomic.UIScrollContainer>this.getWidget("contentcontainerscroll");
         containerScroll.scrollTo(0, this.containerScrollToHeight);
-
+        this.search = false;
     }
 
     private createButtonLayout(asset: ToolCore.Asset): Atomic.UILayout {
@@ -475,8 +539,8 @@ class ProjectFrame extends ScriptWidget {
 
         var lp = new Atomic.UILayoutParams;
         var buttonHeight = lp.height = 20;
-        
-        //Get the path of the button and compare it to the asset's path to highlight 
+
+        //Get the path of the button and compare it to the asset's path to highlight
         var resourcePath = this.resourceFolder.getPath() + "/" + this.assetReferencePath;
 
         //Highlight Button UI

+ 45 - 5
Script/AtomicEditor/ui/frames/ResourceFrame.ts

@@ -1,8 +1,23 @@
 //
-// 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 ScriptWidget = require("ui/ScriptWidget");
@@ -40,14 +55,29 @@ class ResourceFrame extends ScriptWidget {
 
         if (this.currentResourceEditor) {
             this.currentResourceEditor.save();
+            // Grab the path to this file and pass it to the save resource
+            this.sendEvent(EditorEvents.SaveResourceNotification, {
+                path: ev.path || this.currentResourceEditor.fullPath
+            });
         }
 
     }
 
+    handleDeleteResource(ev: EditorEvents.DeleteResourceEvent) {
+        var editor = this.editors[ev.path];
+        if (editor) {
+            editor.close(true);
+            delete this.editors[ev.path];
+        }
+    }
+
     handleSaveAllResources(data) {
 
         for (var i in this.editors) {
             this.editors[i].save();
+            this.sendEvent(EditorEvents.SaveResourceNotification, {
+                path: this.editors[i].fullPath
+            });
         }
 
     }
@@ -188,6 +218,14 @@ class ResourceFrame extends ScriptWidget {
 
     }
 
+    handleRenameResource(ev:EditorEvents.RenameResourceEvent) {
+        var editor = this.editors[ev.path];
+        if (editor) {
+            this.editors[ev.newPath] = editor;
+            delete this.editors[ev.path];
+        }
+    }
+
     handleWidgetEvent(ev: Atomic.UIWidgetEvent) {
 
         if (ev.type == Atomic.UI_EVENT_TYPE_TAB_CHANGED && ev.target == this.tabcontainer) {
@@ -253,11 +291,13 @@ class ResourceFrame extends ScriptWidget {
 
         this.resourceViewContainer.addChild(this);
 
-        this.subscribeToEvent("ProjectUnloaded", (data) => this.handleProjectUnloaded(data));
+        this.subscribeToEvent(EditorEvents.ProjectUnloadedNotification, (data) => this.handleProjectUnloaded(data));
         this.subscribeToEvent(EditorEvents.EditResource, (data) => this.handleEditResource(data));
         this.subscribeToEvent(EditorEvents.SaveResource, (data) => this.handleSaveResource(data));
         this.subscribeToEvent(EditorEvents.SaveAllResources, (data) => this.handleSaveAllResources(data));
         this.subscribeToEvent(EditorEvents.EditorResourceClose, (ev: EditorEvents.EditorCloseResourceEvent) => this.handleCloseResource(ev));
+        this.subscribeToEvent(EditorEvents.RenameResourceNotification, (ev: EditorEvents.RenameResourceEvent) => this.handleRenameResource(ev));
+        this.subscribeToEvent(EditorEvents.DeleteResourceNotification, (data) => this.handleDeleteResource(data));
 
         this.subscribeToEvent(UIEvents.ResourceEditorChanged, (data) => this.handleResourceEditorChanged(data));
 

+ 19 - 4
Script/AtomicEditor/ui/frames/WelcomeFrame.ts

@@ -1,8 +1,23 @@
 //
-// 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 EditorEvents = require("editor/EditorEvents");

+ 19 - 4
Script/AtomicEditor/ui/frames/inspector/ArrayEditWidget.ts

@@ -1,8 +1,23 @@
 //
-// 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 InspectorUtils = require("./InspectorUtils");

+ 19 - 4
Script/AtomicEditor/ui/frames/inspector/AssemblyInspector.ts

@@ -1,8 +1,23 @@
 //
-// 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 InspectorWidget = require("./InspectorWidget");

+ 19 - 4
Script/AtomicEditor/ui/frames/inspector/AttributeInfoEdit.ts

@@ -1,8 +1,23 @@
 //
-// 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 EditorUI = require("ui/EditorUI");

+ 19 - 4
Script/AtomicEditor/ui/frames/inspector/CSComponentClassSelector.ts

@@ -1,8 +1,23 @@
 //
-// 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 EditorUI = require("ui/EditorUI");

+ 19 - 4
Script/AtomicEditor/ui/frames/inspector/ComponentAttributeUI.ts

@@ -1,8 +1,23 @@
 //
-// 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 EditorUI = require("ui/EditorUI");

+ 19 - 4
Script/AtomicEditor/ui/frames/inspector/CreateComponentButton.ts

@@ -1,8 +1,23 @@
 //
-// 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.
 //
 
 var audioCreateSource = new Atomic.UIMenuItemSource();

+ 20 - 5
Script/AtomicEditor/ui/frames/inspector/InspectorFrame.ts

@@ -1,8 +1,23 @@
 //
-// 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 EditorEvents = require("editor/EditorEvents");
@@ -39,7 +54,7 @@ class InspectorFrame extends ScriptWidget {
         var container = this.getWidget("inspectorcontainer");
 
         this.subscribeToEvent(EditorEvents.EditResource, (data) => this.handleEditResource(data));
-        this.subscribeToEvent("ProjectUnloaded", (data) => this.handleProjectUnloaded(data));
+        this.subscribeToEvent(EditorEvents.ProjectUnloadedNotification, (data) => this.handleProjectUnloaded(data));
 
         this.subscribeToEvent(EditorEvents.ActiveSceneEditorChange, (data) => this.handleActiveSceneEditorChanged(data));
 

+ 19 - 4
Script/AtomicEditor/ui/frames/inspector/InspectorUtils.ts

@@ -1,8 +1,23 @@
 //
-// 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.
 //
 
 class InspectorUtils {

+ 19 - 4
Script/AtomicEditor/ui/frames/inspector/InspectorWidget.ts

@@ -1,8 +1,23 @@
 //
-// 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 ScriptWidget = require("ui/ScriptWidget");

+ 24 - 9
Script/AtomicEditor/ui/frames/inspector/MaterialInspector.ts

@@ -1,8 +1,23 @@
 //
-// 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 ScriptWidget = require("ui/ScriptWidget");
@@ -76,7 +91,7 @@ class MaterialInspector extends ScriptWidget {
 
     currentTexture: Atomic.UITextureWidget = null;
     tunit: number;
-    textureWidget: Atomic.UITextureWidget 
+    textureWidget: Atomic.UITextureWidget
 
     constructor() {
 
@@ -246,7 +261,7 @@ class MaterialInspector extends ScriptWidget {
     openTextureSelectionBox(textureUnit: number, textureWidget: Atomic.UITextureWidget) {
 
         var inspector = this;
-        
+
         EditorUI.getModelOps().showResourceSelection("Select Texture", "TextureImporter", "Texture2D", function (asset: ToolCore.Asset, args: any) {
 
             var texture = <Atomic.Texture2D>Atomic.cache.getResource("Texture2D", asset.path);
@@ -259,12 +274,12 @@ class MaterialInspector extends ScriptWidget {
             }
 
         });
-        
+
     }
-    
+
      // Big Texture Button(referenced texture file path in project frame)
     createTextureButtonCallback(textureUnit:number, textureWidget:Atomic.UITextureWidget) {
-        
+
         return () => {
 
             var texture = this.material.getTexture(textureUnit);

+ 19 - 4
Script/AtomicEditor/ui/frames/inspector/ModelInspector.ts

@@ -1,8 +1,23 @@
 //
-// 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 InspectorWidget = require("./InspectorWidget");

+ 19 - 4
Script/AtomicEditor/ui/frames/inspector/PrefabInspector.ts

@@ -1,8 +1,23 @@
 //
-// 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 InspectorWidget = require("./InspectorWidget");

+ 19 - 4
Script/AtomicEditor/ui/frames/inspector/SelectionEditTypes.ts

@@ -1,8 +1,23 @@
 //
-// 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 SerializableEditType = require("./SerializableEditType");

+ 19 - 4
Script/AtomicEditor/ui/frames/inspector/SelectionInspector.ts

@@ -1,8 +1,23 @@
 //
-// 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 EditorUI = require("../../EditorUI");

+ 19 - 4
Script/AtomicEditor/ui/frames/inspector/SelectionPrefabWidget.ts

@@ -1,8 +1,23 @@
 //
-// 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.
 //
 
 

+ 19 - 4
Script/AtomicEditor/ui/frames/inspector/SelectionSection.ts

@@ -1,8 +1,23 @@
 //
-// 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 SerializableEditType = require("./SerializableEditType");

+ 19 - 4
Script/AtomicEditor/ui/frames/inspector/SelectionSectionCoreUI.ts

@@ -1,8 +1,23 @@
 //
-// 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 EditorUI = require("ui/EditorUI");

+ 19 - 4
Script/AtomicEditor/ui/frames/inspector/SelectionSectionUI.ts

@@ -1,8 +1,23 @@
 //
-// 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 SerializableEditType = require("./SerializableEditType");

+ 19 - 4
Script/AtomicEditor/ui/frames/inspector/SerializableEditType.ts

@@ -1,8 +1,23 @@
 //
-// 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.
 //
 
 class SerializableEditType {

+ 19 - 4
Script/AtomicEditor/ui/frames/inspector/TextureSelector.ts

@@ -1,8 +1,23 @@
 //
-// 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.
 //
 
 class TextureSelector extends Atomic.UIWindow {

+ 38 - 7
Script/AtomicEditor/ui/frames/menus/HierarchyFrameMenu.ts

@@ -1,23 +1,43 @@
 //
-// 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("ui/EditorStrings");
 import EditorEvents = require("editor/EditorEvents");
 import EditorUI = require("ui/EditorUI");
 import MenuItemSources = require("./MenuItemSources");
+import ServiceLocator from "../../../hostExtensions/ServiceLocator";
 
 class HierarchyFrameMenus extends Atomic.ScriptObject {
 
+    contentFolder: string;
+
+    private contextMenuItemSource: Atomic.UIMenuItemSource = null;
+
     constructor() {
 
         super();
 
         MenuItemSources.createMenuItemSource("hierarchy create items", createItems);
-        MenuItemSources.createMenuItemSource("node context general", nodeGeneralContextItems);
+        this.contextMenuItemSource = MenuItemSources.createMenuItemSource("node context general", nodeGeneralContextItems);
 
         this.subscribeToEvent(EditorEvents.ContentFolderChanged, (ev: EditorEvents.ContentFolderChangedEvent) => {
             this.contentFolder = ev.path;
@@ -86,6 +106,8 @@ class HierarchyFrameMenus extends Atomic.ScriptObject {
                 node.remove();
                 scene.sendEvent("SceneEditAddRemoveNodes", { end: true });
 
+                return true;
+
             } else if (refid == "duplicate_node") {
 
                 if (node instanceof Atomic.Scene)
@@ -93,9 +115,12 @@ class HierarchyFrameMenus extends Atomic.ScriptObject {
 
                 var newnode = node.clone();
                 node.scene.sendEvent("SceneEditNodeCreated", { node: newnode });
+
+                return true;
             }
 
-            return true;
+            // Let plugins handle context
+            return ServiceLocator.uiServices.hierarchyContextItemClicked(node, refid);
         }
 
         return false;
@@ -118,7 +143,13 @@ class HierarchyFrameMenus extends Atomic.ScriptObject {
 
     }
 
-    contentFolder: string;
+    createPluginItemSource(id: string, items: any): Atomic.UIMenuItemSource {
+        return MenuItemSources.createSubMenuItemSource(this.contextMenuItemSource , id, items);
+    }
+
+    removePluginItemSource(id: string) {
+        this.contextMenuItemSource.removeItemWithStr(id);
+    }
 
 }
 

+ 67 - 8
Script/AtomicEditor/ui/frames/menus/MainFrameMenu.ts

@@ -1,17 +1,36 @@
 //
-// 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 EditorEvents = require("../../../editor/EditorEvents");
 import EditorUI = require("../../EditorUI");
 import MenuItemSources = require("./MenuItemSources");
+import Preferences = require("editor/Preferences");
+import ServiceLocator from "../../../hostExtensions/ServiceLocator";
 
 class MainFrameMenu extends Atomic.ScriptObject {
 
+    private pluginMenuItemSource: Atomic.UIMenuItemSource;
+
     constructor() {
 
         super();
@@ -25,6 +44,27 @@ class MainFrameMenu extends Atomic.ScriptObject {
 
     }
 
+    createPluginMenuItemSource(id: string, items: any): Atomic.UIMenuItemSource {
+        if (!this.pluginMenuItemSource) {
+            var developerMenuItemSource = MenuItemSources.getMenuItemSource("menu developer");
+            this.pluginMenuItemSource = MenuItemSources.createSubMenuItemSource(developerMenuItemSource ,"Plugins", {});
+        }
+
+        return MenuItemSources.createSubMenuItemSource(this.pluginMenuItemSource , id, items);
+
+    }
+
+    removePluginMenuItemSource(id: string) {
+        if (this.pluginMenuItemSource) {
+            this.pluginMenuItemSource.removeItemWithStr(id);
+            if (0 == this.pluginMenuItemSource.itemCount) {
+                var developerMenuItemSource = MenuItemSources.getMenuItemSource("menu developer");
+                developerMenuItemSource.removeItemWithStr("Plugins");
+                this.pluginMenuItemSource = null;
+            }
+        }
+    }
+
     handlePopupMenu(target: Atomic.UIWidget, refid: string): boolean {
 
         if (target.id == "menu edit popup") {
@@ -202,15 +242,29 @@ class MainFrameMenu extends Atomic.ScriptObject {
             if (refid == "developer assetdatabase scan") {
 
               ToolCore.assetDatabase.scan();
+              return true;
 
             }
 
             if (refid == "developer assetdatabase force") {
 
               ToolCore.assetDatabase.reimportAllAssets();
+              return true;
 
             }
 
+            //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();
+                return true;
+            }
+
+            // If we got here, then we may have been injected by a plugin.  Notify the plugins
+            return ServiceLocator.uiServices.menuItemClicked(refid);
 
         } else if (target.id == "menu tools popup") {
 
@@ -249,6 +303,10 @@ class MainFrameMenu extends Atomic.ScriptObject {
             } else if (refid == "help chat") {
                 Atomic.fileSystem.systemOpen("https://gitter.im/AtomicGameEngine/AtomicGameEngine/");
                 return true;
+            }
+            else if (refid == "help getting started") {
+                Atomic.fileSystem.systemOpen("http://atomicgameengine.com/learn/");
+                return true;
             } else if (refid == "help github") {
                 Atomic.fileSystem.systemOpen("https://github.com/AtomicGameEngine/AtomicGameEngine/");
                 return true;
@@ -258,6 +316,8 @@ class MainFrameMenu extends Atomic.ScriptObject {
                 return true;
             }
 
+        } else {
+            console.log("Menu: " + target.id + " clicked");
         }
 
     }
@@ -312,6 +372,7 @@ var buildItems = {
 var developerItems = {
 
     "Show Console": ["developer show console"],
+    "Clear Preferences": ["developer clear preferences"], //Adds clear preference to developer menu items list
     "Debug": {
         "UI Debugger": ["developer show uidebugger"],
         "Asset Database": {
@@ -340,14 +401,12 @@ var fileItems = {
 
 var helpItems = {
 
-    "Check for Updates": "check update",
+    "Getting Started": "help getting started",
     "API Documentation": ["help api"],
     "-1": null,
     "Atomic Chat": ["help chat"],
     "Atomic Forums": ["help forums"],
     "-2": null,
     "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"
 };

+ 36 - 10
Script/AtomicEditor/ui/frames/menus/MenuItemSources.ts

@@ -1,8 +1,23 @@
 //
-// 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("ui/EditorStrings");
@@ -62,12 +77,7 @@ function createMenuItemSourceRecursive(items: any): Atomic.UIMenuItemSource {
 
             }
             else if (typeof value === "object") {
-
-                var subsrc = createMenuItemSourceRecursive(value);
-
-                var item = new Atomic.UIMenuItem(key);
-                item.subSource = subsrc;
-                src.addItem(item);
+                createSubMenuItemSource(src, key, value);
 
             }
 
@@ -80,6 +90,16 @@ function createMenuItemSourceRecursive(items: any): Atomic.UIMenuItemSource {
 
 }
 
+export function createSubMenuItemSource(src: Atomic.UIMenuItemSource, id: string, items: any): Atomic.UIMenuItemSource {
+    var subsrc = createMenuItemSourceRecursive(items);
+
+    var item = new Atomic.UIMenuItem(id);
+    item.subSource = subsrc;
+    src.addItem(item);
+
+    return subsrc;
+}
+
 export function createMenuItemSource(id: string, items: any): Atomic.UIMenuItemSource {
 
     srcLookup[id] = createMenuItemSourceRecursive(items);
@@ -87,3 +107,9 @@ export function createMenuItemSource(id: string, items: any): Atomic.UIMenuItemS
     return srcLookup[id];
 
 }
+
+export function deleteMenuItemSource(id: string) {
+    if (srcLookup[id]) {
+        delete srcLookup[id];
+    }
+}

+ 34 - 6
Script/AtomicEditor/ui/frames/menus/ProjectFrameMenu.ts

@@ -1,23 +1,43 @@
 //
-// 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("ui/EditorStrings");
 import EditorEvents = require("editor/EditorEvents");
 import EditorUI = require("ui/EditorUI");
 import MenuItemSources = require("./MenuItemSources");
+import ServiceLocator from "../../../hostExtensions/ServiceLocator";
 
 class ProjectFrameMenus extends Atomic.ScriptObject {
 
+    contentFolder: string;
+
+    private contextMenuItemSource: Atomic.UIMenuItemSource = null;
+
     constructor() {
 
         super();
 
         MenuItemSources.createMenuItemSource("asset context folder", assetFolderContextItems);
-        MenuItemSources.createMenuItemSource("asset context general", assetGeneralContextItems);
+        this.contextMenuItemSource = MenuItemSources.createMenuItemSource("asset context general", assetGeneralContextItems);
         MenuItemSources.createMenuItemSource("project create items", createItems);
 
         this.subscribeToEvent(EditorEvents.ContentFolderChanged, (ev: EditorEvents.ContentFolderChangedEvent) => {
@@ -91,6 +111,8 @@ class ProjectFrameMenus extends Atomic.ScriptObject {
                 return true;
             }
 
+            // Let plugins handle context
+            return ServiceLocator.uiServices.projectContextItemClicked(asset, refid);
         }
 
         return false;
@@ -134,7 +156,13 @@ class ProjectFrameMenus extends Atomic.ScriptObject {
 
     }
 
-    contentFolder: string;
+    createPluginItemSource(id: string, items: any): Atomic.UIMenuItemSource {
+        return MenuItemSources.createSubMenuItemSource(this.contextMenuItemSource , id, items);
+    }
+
+    removePluginItemSource(id: string) {
+        this.contextMenuItemSource.removeItemWithStr(id);
+    }
 
 }
 

+ 19 - 9
Script/AtomicEditor/ui/modal/About.ts

@@ -1,8 +1,23 @@
 //
-// 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 EditorUI = require("../EditorUI");
@@ -21,7 +36,6 @@ class About extends ModalWindow {
         this.load("AtomicEditor/editor/ui/about.tb.txt");
 
         this.age_license = <Atomic.UIEditField>this.getWidget("age_license");
-        this.age_runtimelicense = <Atomic.UIEditField> this.getWidget("age_runtime_license");
         this.thirdparty_license = <Atomic.UIEditField>this.getWidget("thirdparty_license");
         this.externaltool_license = <Atomic.UIEditField>this.getWidget("externaltool_license");
         this.about_text = <Atomic.UIEditField>this.getWidget("about_text");
@@ -31,9 +45,6 @@ class About extends ModalWindow {
         var file = cache.getFile("AtomicEditor/eulas/atomic_game_engine_eula.txt");
         this.age_license.text = file.readText();
 
-        file = cache.getFile("AtomicEditor/eulas/atomic_runtime_eula.txt");
-        this.age_runtimelicense.text = file.readText();
-
         file = cache.getFile("AtomicEditor/eulas/atomic_thirdparty_eula.txt");
         this.thirdparty_license.text = file.readText();
 
@@ -119,7 +130,6 @@ class About extends ModalWindow {
     }
 
     age_license: Atomic.UIEditField;
-    age_runtimelicense: Atomic.UIEditField;
     thirdparty_license: Atomic.UIEditField;
     externaltool_license: Atomic.UIEditField;
     about_text: Atomic.UIEditField;

+ 25 - 6
Script/AtomicEditor/ui/modal/CreateProject.ts

@@ -1,15 +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 EditorEvents = require("../../editor/EditorEvents");
 import EditorUI = require("../EditorUI");
 import ModalWindow = require("./ModalWindow");
 
-import ProjectTemplates = require("../resources/ProjectTemplates");
+import ProjectTemplates = require("../../resources/ProjectTemplates");
 
 class CreateProject extends ModalWindow {
 
@@ -100,7 +115,11 @@ class CreateProject extends ModalWindow {
             // Do the creation!
             if (templateDetail && fileSystem.dirExists(templateDetail.folder)) {
 
-                fileSystem.copyDir(templateDetail.folder, folder);
+                if (!fileSystem.copyDir(templateDetail.folder, folder)) {
+                  var message = "Unable to copy folder: " + templateDetail.folder + " to " + folder;
+                  EditorUI.showModalError("New Project Editor Error", message);
+                  return false;
+                }
 
                 var utils = new Editor.FileUtils();
 

+ 45 - 0
Script/AtomicEditor/ui/modal/ExtensionWindow.ts

@@ -0,0 +1,45 @@
+//
+// 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 EditorUI = require("../EditorUI");
+import ModalWindow = require("./ModalWindow");
+
+class ExtensionWindow extends ModalWindow {
+
+    private handleWidgetEventCB: (ev: Atomic.UIWidgetEvent) => void;
+
+    constructor(windowText: string, uifilename: string, handleWidgetEventCB: (ev: Atomic.UIWidgetEvent) => void) {
+
+        super();
+
+        this.init(windowText, uifilename);
+
+        this.handleWidgetEventCB = handleWidgetEventCB;
+    }
+
+    handleWidgetEvent(ev: Atomic.UIWidgetEvent) {
+        if (this.handleWidgetEventCB)
+            this.handleWidgetEventCB(ev);
+    }
+}
+
+export = ExtensionWindow;

+ 19 - 4
Script/AtomicEditor/ui/modal/MessageModal.ts

@@ -1,8 +1,23 @@
 //
-// 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 UIEvents = require("../UIEvents");

+ 29 - 4
Script/AtomicEditor/ui/modal/ModalOps.ts

@@ -1,8 +1,23 @@
 //
-// 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 EditorUI = require("../EditorUI");
@@ -28,6 +43,8 @@ import UIResourceOps = require("./UIResourceOps");
 
 import SnapSettingsWindow = require("./SnapSettingsWindow");
 
+import ExtensionWindow = require("./ExtensionWindow");
+
 import ProjectTemplates = require("../../resources/ProjectTemplates");
 
 
@@ -265,6 +282,14 @@ class ModalOps extends Atomic.ScriptObject {
 
     }
 
+    showExtensionWindow(windowText: string, uifilename: string, handleWidgetEventCB: (ev: Atomic.UIWidgetEvent) => void): Editor.Modal.ExtensionWindow {
+        if (this.show()) {
+
+            this.opWindow = new ExtensionWindow(windowText, uifilename, handleWidgetEventCB);
+            return this.opWindow;
+        }
+    }
+
     private show(): boolean {
 
         if (this.dimmer.parent) {

+ 19 - 4
Script/AtomicEditor/ui/modal/ModalWindow.ts

@@ -1,8 +1,23 @@
 //
-// 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 EditorUI = require("../EditorUI");

+ 19 - 4
Script/AtomicEditor/ui/modal/NewProject.ts

@@ -1,8 +1,23 @@
 //
-// 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 EditorUI = require("../EditorUI");

+ 19 - 4
Script/AtomicEditor/ui/modal/ProgressModal.ts

@@ -1,8 +1,23 @@
 //
-// 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 EditorUI = require("../EditorUI");

Some files were not shown because too many files changed in this diff