Browse Source

Adding new build dialog

Josh Engebretson 9 years ago
parent
commit
c4bd262572

BIN
Resources/EditorData/AtomicEditor/editor/images/josh.jpg


+ 12 - 0
Resources/EditorData/AtomicEditor/editor/ui/newbuildwindow.tb.txt

@@ -0,0 +1,12 @@
+TBLayout: axis: y
+    gravity all
+    TBEditField: multiline: 1, styling: 1, gravity: all, id: newbuild_text, readonly: 1, adapt-to-content: 0
+        font: size: 14
+        lp: max-width: 640, min-width: 640, min-height: 480, max-height: 480
+        text: "..."
+    TBLayout:
+        TBCheckBox: id: newbuild_check
+        TBTextField: text: "Don't show me again until a new build is installed"
+            font: size: 16
+    TBButton: text: Current Funding Information, id: ok
+        lp: min-width: 128, min-height: 48

+ 39 - 37
Resources/EditorData/AtomicEditor/editor/ui/welcomeframe.tb.txt

@@ -1,38 +1,40 @@
 TBLayout: distribution: gravity, size: available, axis: y, id: welcomelayout, position: left
-	TBLayout: distribution: gravity, size: available
-		lp: max-height: 150
-		TBLayout: axis: y 
-			TBLayout: distribution: gravity
-				TBButton: id: open project
-					text Open Project
-				TBButton: id: new project
-					text New Project
-			TBLayout: distribution: gravity, axis: y, position: left, id: recentprojects
-				TBEditField: text: "<color #76D6FF>Recent Projects:</color>", styling: 1, readonly: 1, adapt-to-content: 1, skin: 0
-	TBLayout: distribution: gravity, size: available
-		TBLayout: distribution: gravity, axis: y, position: left
-			TBEditField: text: "<color #76D6FF>Welcome:</color>", styling: 1, readonly: 1, adapt-to-content: 1, skin: 0
-			TBImageWidget: filename: "AtomicEditor/editor/images/earlyaccess_header.png"
-				lp: width: 420, height: 137
-			TBEditField: multiline: 1, styling: 1, gravity: all, id: welcome_text, readonly: 1, adapt-to-content: 0
-				font: size: 14
-				lp: max-width: 420, min-width: 420
-				text: "Welcome to the Atomic Game Engine Early Access\n\n" \
-				"<color #D4FB79>First Steps</color>\n\n" \
-				"• Try out some of the example projects!\n\n" \
-				"• Create a new project based on a 2D or 3D template.\n\n" \
-				"<color #D4FB79>Getting Started Videos & Javascript API Docs</color>\n" \
-				"<widget TBButton: id: 'getting_started' text: 'http://atomicgameengine.com/learn', skin: TBButton.link>\n\n" \
-				"<color #D4FB79>Forum</color>\n" \
-				"<widget TBButton: id: 'forum' text: 'http://atomicgameengine.com/forum', skin: TBButton.link>\n\n" \
-				"<color #D4FB79>Atomic Game Engine on GitHub</color>\n" \
-				"<widget TBButton: id: 'atomic_github' text: 'https://github.com/AtomicGameEngine', skin: TBButton.link>\n\n"				
-		TBLayout: distribution: gravity, axis: y, spacing: 12
-			TBLayout: distribution: gravity, size: available
-				TBContainer: gravity: left right
-					TBLayout: distribution: gravity
-						TBEditField: text: "<color #76D6FF>More Examples:</color>", styling: 1, readonly: 1, adapt-to-content: 1, skin: 0
-						TBButton: id: 'examples_github' text: "https://github.com/AtomicGameEngine/AtomicExamples", skin: TBButton.link
-						TBWidget: gravity: left right
-			TBScrollContainer: scroll-mode: auto
-				TBLayout: id: examples_layout, axis: y, spacing: 12
+    TBLayout: distribution: gravity, size: available
+        lp: max-height: 150
+        TBLayout: axis: y
+            TBLayout: distribution: gravity
+                TBButton: id: open project
+                    text Open Project
+                TBButton: id: new project
+                    text New Project
+            TBLayout: distribution: gravity, axis: y, position: left, id: recentprojects
+                TBEditField: text: "<color #76D6FF>Recent Projects:</color>", styling: 1, readonly: 1, adapt-to-content: 1, skin: 0
+    TBLayout: distribution: gravity, size: available
+        TBLayout: distribution: gravity, axis: y, position: left
+            TBEditField: text: "<color #76D6FF>Welcome:</color>", styling: 1, readonly: 1, adapt-to-content: 1, skin: 0
+            TBImageWidget: filename: "AtomicEditor/editor/images/earlyaccess_header.png"
+                lp: width: 420, height: 137
+            TBEditField: multiline: 1, styling: 1, gravity: all, id: welcome_text, readonly: 1, adapt-to-content: 0
+                font: size: 14
+                lp: max-width: 420, min-width: 420
+                text: "Welcome to the Atomic Game Engine Early Access\n\n" \
+                "<color #D4FB79>First Steps</color>\n\n" \
+                "• Try out some of the example projects!\n\n" \
+                "• Create a new project based on a 2D or 3D template.\n\n" \
+                "<color #D4FB79>Getting Started Videos & Javascript API Docs</color>\n" \
+                "<widget TBButton: id: 'getting_started' text: 'http://atomicgameengine.com/learn', skin: TBButton.link>\n\n" \
+                "<color #D4FB79>Forum</color>\n" \
+                "<widget TBButton: id: 'forum' text: 'http://atomicgameengine.com/forum', skin: TBButton.link>\n\n" \
+                "<color #D4FB79>Atomic Game Engine on GitHub</color>\n" \
+                "<widget TBButton: id: 'atomic_github' text: 'https://github.com/AtomicGameEngine', skin: TBButton.link>\n\n" \
+                "<color #D4FB79>Atomic Game Engine Funding Information</color>\n" \
+                "<widget TBButton: id: 'atomic_github' text: 'http://atomicgameengine.com/funding', skin: TBButton.link>\n\n"
+        TBLayout: distribution: gravity, axis: y, spacing: 12
+            TBLayout: distribution: gravity, size: available
+                TBContainer: gravity: left right
+                    TBLayout: distribution: gravity
+                        TBEditField: text: "<color #76D6FF>More Examples:</color>", styling: 1, readonly: 1, adapt-to-content: 1, skin: 0
+                        TBButton: id: 'examples_github' text: "https://github.com/AtomicGameEngine/AtomicExamples", skin: TBButton.link
+                        TBWidget: gravity: left right
+            TBScrollContainer: scroll-mode: auto
+                TBLayout: id: examples_layout, axis: y, spacing: 12

+ 8 - 21
Script/AtomicEditor/editor/EditorLicense.ts

@@ -21,6 +21,7 @@
 //
 
 import EditorUI = require("../ui/EditorUI");
+import Preferences = require("editor/Preferences");
 
 class EditorLicense extends Atomic.ScriptObject {
 
@@ -29,21 +30,7 @@ class EditorLicense extends Atomic.ScriptObject {
         super();
 
         this.subscribeToEvent("LicenseEulaRequired", (eventData) => this.handleLicenseEulaRequired(eventData));
-        this.subscribeToEvent("LicenseActivationRequired", (eventData) => this.handleLicenseActivationRequired(eventData));
-        this.subscribeToEvent("LicenseSuccess", (eventData) => this.handleLicenseSuccess(eventData));
-
-        this.subscribeToEvent("IPCMessage", (eventData:Atomic.IPCMessageEvent) => this.handleIPCMessage(eventData));
-
-    }
-
-    handleIPCMessage(eventData:Atomic.IPCMessageEvent) {
-
-      if (eventData.message == "3D Module License Required") {
-
-        var ops = EditorUI.getModelOps();
-        ops.showPro3DWindow();
-
-      }
+        this.subscribeToEvent("LicenseEulaAccepted", (eventData) => this.handleLicenseEulaAccepted(eventData));
 
     }
 
@@ -54,15 +41,15 @@ class EditorLicense extends Atomic.ScriptObject {
 
     }
 
-    handleLicenseActivationRequired(eventData) {
-
-        var ops = EditorUI.getModelOps();
-        ops.showActivationWindow();
+    handleLicenseEulaAccepted(eventData) {
 
-    }
+        var sha = Atomic.getGitRevision();
 
-    handleLicenseSuccess(eventData) {
+        if (sha == "Unversioned Build" || Preferences.getInstance().editorBuildData.lastEditorBuildSHA == sha)
+            return;
 
+        var ops = EditorUI.getModelOps();
+        ops.showNewBuildWindow();
 
     }
 

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

@@ -157,6 +157,10 @@ class Preferences {
         return this._prefs.uiData;
     }
 
+    get editorBuildData(): EditorBuildData {
+        return this._prefs.editorBuildData;
+    }
+
     static getInstance(): Preferences {
         return Preferences.instance;
     }
@@ -296,6 +300,11 @@ interface UserInterfaceData {
     fontSize : number;
 }
 
+interface EditorBuildData {
+    lastEditorBuildSHA : string;
+}
+
+
 class PreferencesFormat {
 
     constructor() {
@@ -342,6 +351,10 @@ class PreferencesFormat {
             fontSize : 12
         };
 
+        this.editorBuildData = {
+            lastEditorBuildSHA : "Unversioned Build"
+        }
+
     }
 
     /**
@@ -377,6 +390,11 @@ class PreferencesFormat {
             updatedMissingDefaults = true;
         }
 
+        if (!prefs.editorBuildData) {
+            prefs.editorBuildData = this.editorBuildData;
+            updatedMissingDefaults = true;
+        }
+
         return updatedMissingDefaults;
     }
 
@@ -385,6 +403,7 @@ class PreferencesFormat {
     playerWindow: WindowData;
     codeEditorSettings: AceEditorSettings;
     uiData : UserInterfaceData;
+    editorBuildData : EditorBuildData;
 }
 
 export = Preferences;

+ 0 - 4
Script/AtomicEditor/ui/frames/menus/MainFrameMenu.ts

@@ -293,10 +293,6 @@ class MainFrameMenu extends Atomic.ScriptObject {
                 EditorUI.getModelOps().showAbout();
                 return true;
             }
-            if (refid == "manage license") {
-                EditorUI.getModelOps().showManageLicense();
-                return true;
-            }
             if (refid == "help forums") {
                 Atomic.fileSystem.systemOpen("http://atomicgameengine.com/forum/");
                 return true;

+ 3 - 49
Script/AtomicEditor/ui/modal/ModalOps.ts

@@ -27,11 +27,7 @@ import NewProject = require("./NewProject");
 import CreateProject = require("./CreateProject");
 
 import EULAWindow = require("./license/EULAWindow");
-import ActivationWindow = require("./license/ActivationWindow");
-import ActivationSuccessWindow = require("./license/ActivationSuccessWindow");
-import ManageLicense = require("./license/ManageLicense");
-import Pro3DWindow = require("./license/Pro3DWindow");
-import ProPlatformWindow = require("./license/ProPlatformWindow");
+import NewBuildWindow = require("./license/NewBuildWindow");
 
 import BuildWindow = require("./build/BuildWindow");
 import BuildOutput = require("./build/BuildOutput");
@@ -169,47 +165,16 @@ class ModalOps extends Atomic.ScriptObject {
 
     }
 
-    showActivationWindow() {
+    showNewBuildWindow() {
 
         if (this.show()) {
 
-            this.opWindow = new ActivationWindow();
+            this.opWindow = new NewBuildWindow();
 
         }
 
     }
 
-    showManageLicense() {
-
-        if (this.show()) {
-
-            this.opWindow = new ManageLicense();
-
-        }
-
-    }
-
-    showPro3DWindow() {
-
-        if (this.show()) {
-
-            this.opWindow = new Pro3DWindow();
-
-        }
-
-    }
-
-    showProPlatformWindow() {
-
-        if (this.show()) {
-
-            this.opWindow = new ProPlatformWindow();
-
-        }
-
-    }
-
-
     showAbout() {
 
         if (this.show()) {
@@ -257,17 +222,6 @@ class ModalOps extends Atomic.ScriptObject {
 
     }
 
-
-    showActivationSuccessWindow() {
-
-        if (this.show()) {
-
-            this.opWindow = new ActivationSuccessWindow();
-
-        }
-
-    }
-
     showSnapSettings() {
 
         // only show snap settings if we have a project loaded

+ 0 - 6
Script/AtomicEditor/ui/modal/build/BuildSettingsWindow.ts

@@ -158,12 +158,6 @@ export class BuildSettingsWindow extends ModalWindow {
 
                         }
 
-                        if (!platform.license) {
-                            this.hide();
-                            EditorUI.getModelOps().showProPlatformWindow();
-                            return true;
-                        }
-
                         toolSystem.setCurrentPlatform(platform.platformID);
 
                         return true;

+ 0 - 55
Script/AtomicEditor/ui/modal/license/ActivationSuccessWindow.ts

@@ -1,55 +0,0 @@
-//
-// 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("ui/EditorUI");
-import ModalWindow = require("../ModalWindow");
-
-class ActivationSuccessWindow extends ModalWindow {
-
-    constructor() {
-
-        super();
-
-        this.init("Product Activation Successful", "AtomicEditor/editor/ui/activationsuccess.tb.txt");
-    }
-
-    handleWidgetEvent(ev: Atomic.UIWidgetEvent) {
-
-        if (ev.type == Atomic.UI_EVENT_TYPE_CLICK) {
-
-            var id = ev.target.id;
-
-            if (id == "ok") {
-
-                this.hide();
-
-                return true;
-            }
-
-        }
-
-    }
-
-}
-
-export = ActivationSuccessWindow;

+ 0 - 115
Script/AtomicEditor/ui/modal/license/ActivationWindow.ts

@@ -1,115 +0,0 @@
-//
-// 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("ui/EditorUI");
-import ModalWindow = require("../ModalWindow");
-import ProgressModal = require("../ProgressModal");
-
-class ActivationWindow extends ModalWindow {
-
-    constructor() {
-
-        super(true);
-
-        this.init("Product Activation", "AtomicEditor/editor/ui/activation.tb.txt");
-
-        this.licenseKeyEdit = <Atomic.UIEditField>this.getWidget("license_key");
-
-        this.subscribeToEvent("LicenseActivationError", (eventData) => this.handleLicenseActivationError(eventData));
-        this.subscribeToEvent("LicenseActivationSuccess", (eventData) => this.handleLicenseActivationSuccess(eventData));
-
-        this.progressModal = new ProgressModal("Activation", "Activating, please wait...");
-
-        if (ToolCore.licenseSystem.sourceBuild) {
-
-            var message = "\nThis is a <color #76D6FF>development snapshot</color> of the Atomic Editor intended for testing new features.\n\n";
-            message += "Please report issues to the Atomic Forums or GitHub issue tracker.";
-            new Atomic.UIMessageWindow(this, "modal_error").show("Atomic Editor - Development Snapshot", message, Atomic.UI_MESSAGEWINDOW_SETTINGS_OK, true, 640, 260);
-
-        }
-
-    }
-
-    handleLicenseActivationError(ev) {
-
-        this.progressModal.hide();
-
-        EditorUI.showModalError("Activation Error",
-            ev.message);
-
-    }
-
-    handleLicenseActivationSuccess(ev) {
-
-        this.progressModal.hide();
-
-        this.hide();
-
-        EditorUI.getModelOps().showActivationSuccessWindow();
-
-
-    }
-
-    handleWidgetEvent(ev: Atomic.UIWidgetEvent) {
-
-        if (ev.type == Atomic.UI_EVENT_TYPE_CLICK) {
-
-            var id = ev.target.id;
-
-            if (id == "quit") {
-
-                this.sendEvent("ExitRequested");
-                return true;
-
-            } else if (id == "get_key") {
-
-                var fileSystem = Atomic.getFileSystem();
-                fileSystem.systemOpen("https://store.atomicgameengine.com/site");
-
-            } else if (id == "activate") {
-
-                var key = this.licenseKeyEdit.text.trim().toUpperCase();
-                var licenseSystem = ToolCore.getLicenseSystem();
-                if (!licenseSystem.validateKey(key)) {
-
-                    EditorUI.showModalError("Invalid Product Key",
-                        "The key entered is invalid\n\nProduct keys are in the form of ATOMIC-XXXX-XXXX-XXXX-XXXX");
-
-                    return true;
-                }
-
-                this.progressModal.show();
-
-                licenseSystem.requestServerActivation(key);
-
-            }
-
-
-        }
-
-    }
-    progressModal: ProgressModal;
-    licenseKeyEdit: Atomic.UIEditField;
-}
-
-export = ActivationWindow;

+ 2 - 0
Script/AtomicEditor/ui/modal/license/EULAWindow.ts

@@ -78,6 +78,8 @@ class EULAWindow extends ModalWindow {
                 var licenseSystem = ToolCore.getLicenseSystem();
                 licenseSystem.licenseAgreementConfirmed();
 
+                this.sendEvent("LicenseEulaAccepted");
+
                 return true;
             }
 

+ 0 - 102
Script/AtomicEditor/ui/modal/license/ManageLicense.ts

@@ -1,102 +0,0 @@
-//
-// 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("ui/EditorUI");
-import ModalWindow = require("../ModalWindow");
-import ProgressModal = require("../ProgressModal");
-
-class ManageLicense extends ModalWindow {
-
-    constructor() {
-
-        super();
-
-        this.init("Product Activation", "AtomicEditor/editor/ui/managelicense.tb.txt");
-
-        this.progressModal = new ProgressModal("License Management", "Returning license, please wait...");
-
-    }
-
-    handleWidgetEvent(ev: Atomic.UIWidgetEvent) {
-
-        if (ev.type == Atomic.UI_EVENT_TYPE_CLICK) {
-
-            var id = ev.target.id;
-
-            if (id == "ok") {
-
-                this.hide();
-                return true;
-            }
-
-            if (ev.refid == "TBMessageWindow.ok") {
-
-                if (ToolCore.licenseSystem.deactivate()) {
-
-                    this.progressModal.show();
-
-                    this.subscribeToEvent("LicenseDeactivationSuccess", (ev) => {
-
-                        this.progressModal.hide();
-                        this.hide();
-
-                        EditorUI.getModelOps().showActivationWindow();
-
-                    });
-
-                    this.subscribeToEvent("LicenseDeactivationError", (ev: ToolCore.LicenseDeactivationErrorEvent) => {
-
-                        this.progressModal.hide();
-
-                        EditorUI.showModalError("Deactivation Error", ev.message);
-
-                    });
-
-                }
-
-                return true;
-            }
-
-
-            if (id == "return_activation") {
-
-                if (ToolCore.toolSystem.project) {
-                    EditorUI.showModalError("Project Open",
-                        "Please close the current project before deactivating license");
-
-                }
-                else {
-                    var confirm = new Atomic.UIMessageWindow(this, "confirm_license_return");
-                    confirm.show("Return License", "Are you sure you want to return the installed license?", Atomic.UI_MESSAGEWINDOW_SETTINGS_OK_CANCEL, true, 300, 140);
-                }
-
-                return true;
-            }
-
-        }
-    }
-
-    progressModal: ProgressModal;
-}
-
-export = ManageLicense;

+ 100 - 0
Script/AtomicEditor/ui/modal/license/NewBuildWindow.ts

@@ -0,0 +1,100 @@
+//
+// 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");
+import Preferences = require("editor/Preferences");
+
+class NewBuildWindow extends ModalWindow {
+
+    constructor() {
+
+        super();
+
+        this.settings = Atomic.UI_WINDOW_SETTINGS_DEFAULT & ~Atomic.UI_WINDOW_SETTINGS_CLOSE_BUTTON;
+
+        // we're not calling this.init here as it calls resizeToFitContent
+        // and center, which screw up the generated About text being resized
+
+        this.text = "New Atomic Editor Build Detected";
+        this.load("AtomicEditor/editor/ui/newbuildwindow.tb.txt");
+
+        this.newbuild_text = <Atomic.UIEditField>this.getWidget("newbuild_text");
+        this.newbuild_text.text = this.generateNewBuildText();
+
+        this.newBuildCheck = <Atomic.UICheckBox> this.getWidget("newbuild_check");
+
+        this.resizeToFitContent();
+        this.center();
+
+    }
+
+    handleWidgetEvent(ev: Atomic.UIWidgetEvent) {
+
+        if (ev.type == Atomic.UI_EVENT_TYPE_CLICK) {
+
+            var id = ev.target.id;
+
+            if (id == "ok") {
+
+                this.hide();
+
+                if (this.newBuildCheck.value) {
+
+                    Preferences.getInstance().editorBuildData.lastEditorBuildSHA = Atomic.getGitRevision();
+                    Preferences.getInstance().write();
+
+                }
+
+                Atomic.fileSystem.systemOpen("http://www.atomicgameengine.com/funding/")
+                return true;
+            }
+        }
+    }
+
+
+    generateNewBuildText(): string {
+
+        var text = "";
+
+        text += `<widget TBImageWidget: filename: 'AtomicEditor/editor/images/atomic_logo.png'>
+
+<color #D4FB79>Hello and thanks for installing a new build of the Atomic Editor!</color>
+
+A cross platform game engine targeting 6 platforms is a lot of work! We need to raise funds in order to continue developing features such as integrated debugging, C# scripting, editor workflow improvements, platform updates, and to address a growing list of issues. There are also other project expenses such as CI hardware, web site updates, hosting costs, etc.
+
+In addition to monetary funding, we need help reviewing pull requests, addressing open issues, providing support in chat, etc.
+
+<widget TBImageWidget: filename: 'AtomicEditor/editor/images/josh.jpg'> - Josh Engebretson on behalf of the Atomic Community
+
+<color #D4FB79>This notice will be displayed whenever a new Atomic Editor build is installed.</color>`;
+
+        return text;
+
+    }
+
+    newbuild_text: Atomic.UIEditField;
+    newBuildCheck: Atomic.UICheckBox;
+
+}
+
+export = NewBuildWindow;

+ 0 - 62
Script/AtomicEditor/ui/modal/license/Pro3DWindow.ts

@@ -1,62 +0,0 @@
-//
-// 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("ui/EditorUI");
-import ModalWindow = require("../ModalWindow");
-import ProgressModal = require("../ProgressModal");
-
-class Pro3DWindow extends ModalWindow {
-
-    constructor() {
-
-        super(false);
-
-        this.init("3D Module License Required", "AtomicEditor/editor/ui/infomodule3d.tb.txt");
-
-    }
-
-    handleWidgetEvent(ev: Atomic.UIWidgetEvent) {
-
-        if (ev.type == Atomic.UI_EVENT_TYPE_CLICK) {
-
-            var id = ev.target.id;
-
-            if (id == "purchase") {
-
-                Atomic.fileSystem.systemOpen("https://store.atomicgameengine.com/site");
-
-            } else if (id == "ok") {
-
-                this.hide();
-
-                return true;
-            }
-
-            return false;
-
-        }
-    }
-
-}
-
-export = Pro3DWindow;

+ 0 - 96
Script/AtomicEditor/ui/modal/license/ProPlatformWindow.ts

@@ -1,96 +0,0 @@
-//
-// 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("ui/EditorUI");
-import ModalWindow = require("../ModalWindow");
-import ProgressModal = require("../ProgressModal");
-
-class ProPlatformWindow extends ModalWindow {
-
-    constructor() {
-
-        super(false);
-
-        this.init("Platform License Required", "AtomicEditor/editor/ui/platformsinfo.tb.txt");
-
-        var editField = <Atomic.UIEditField> this.getWidget("info");
-
-        var text = "\nAtomic Game Engine Pro is required to deploy apps to this platform.\n\n<color #D4FB79>Installed platforms:</color>\n\n";
-
-        var licenseSystem = ToolCore.licenseSystem;
-
-        var installedText = "    <widget TBSkinImage: skin: 'LogoMac-Small'> <widget TBSkinImage: skin: 'LogoWindows-Small'> <widget TBSkinImage: skin: 'LogoHTML5-Small'> ";
-        var availableText = "   ";
-
-        if (licenseSystem.licenseAndroid)
-            installedText += "<widget TBSkinImage: skin: 'LogoAndroid-Small'> ";
-        else
-            availableText += "<widget TBSkinImage: skin: 'LogoAndroid-Small'> ";
-
-            if (licenseSystem.licenseIOS)
-                installedText += "<widget TBSkinImage: skin: 'LogoIOS-Small'> ";
-            else
-                availableText += "<widget TBSkinImage: skin: 'LogoIOS-Small'> ";
-
-        text += installedText + "\n\n\n";
-
-        if (!licenseSystem.licenseIOS || !licenseSystem.licenseAndroid || !licenseSystem.licenseModule3D) {
-          text += "<color #76D6FF>Available platforms:</color>\n\n";
-          text += availableText + "\n\n\n";
-      }
-
-      editField.text = text;
-
-      this.resizeToFitContent();
-      this.center();
-
-      editField.reformat();
-
-
-    }
-
-    handleWidgetEvent(ev: Atomic.UIWidgetEvent) {
-
-        if (ev.type == Atomic.UI_EVENT_TYPE_CLICK) {
-
-            var id = ev.target.id;
-
-            if (id == "purchase") {
-
-                Atomic.fileSystem.systemOpen("https://store.atomicgameengine.com/site");
-
-            } else if (id == "ok") {
-
-                this.hide();
-
-                return true;
-            }
-
-            return false;
-
-        }
-    }
-
-}
-
-export = ProPlatformWindow;

+ 3 - 7
Script/tsconfig.json

@@ -47,7 +47,6 @@
         "./AtomicEditor/ui/frames/inspector/InspectorUtils.ts",
         "./AtomicEditor/ui/frames/inspector/InspectorWidget.ts",
         "./AtomicEditor/ui/frames/inspector/MaterialInspector.ts",
-        "./AtomicEditor/ui/frames/inspector/TextureInspector.ts",
         "./AtomicEditor/ui/frames/inspector/ModelInspector.ts",
         "./AtomicEditor/ui/frames/inspector/PrefabInspector.ts",
         "./AtomicEditor/ui/frames/inspector/SelectionEditTypes.ts",
@@ -57,6 +56,7 @@
         "./AtomicEditor/ui/frames/inspector/SelectionSectionCoreUI.ts",
         "./AtomicEditor/ui/frames/inspector/SelectionSectionUI.ts",
         "./AtomicEditor/ui/frames/inspector/SerializableEditType.ts",
+        "./AtomicEditor/ui/frames/inspector/TextureInspector.ts",
         "./AtomicEditor/ui/frames/inspector/TextureSelector.ts",
         "./AtomicEditor/ui/frames/MainFrame.ts",
         "./AtomicEditor/ui/frames/menus/HierarchyFrameMenu.ts",
@@ -79,12 +79,8 @@
         "./AtomicEditor/ui/modal/build/platforms/WindowsSettingsWidget.ts",
         "./AtomicEditor/ui/modal/CreateProject.ts",
         "./AtomicEditor/ui/modal/ExtensionWindow.ts",
-        "./AtomicEditor/ui/modal/license/ActivationSuccessWindow.ts",
-        "./AtomicEditor/ui/modal/license/ActivationWindow.ts",
         "./AtomicEditor/ui/modal/license/EULAWindow.ts",
-        "./AtomicEditor/ui/modal/license/ManageLicense.ts",
-        "./AtomicEditor/ui/modal/license/Pro3DWindow.ts",
-        "./AtomicEditor/ui/modal/license/ProPlatformWindow.ts",
+        "./AtomicEditor/ui/modal/license/NewBuildWindow.ts",
         "./AtomicEditor/ui/modal/MessageModal.ts",
         "./AtomicEditor/ui/modal/ModalOps.ts",
         "./AtomicEditor/ui/modal/ModalWindow.ts",
@@ -100,11 +96,11 @@
         "./AtomicEditor/ui/resourceEditors/JavascriptResourceEditorBuilder.ts",
         "./AtomicEditor/ui/resourceEditors/JsonResourceEditorBuilder.ts",
         "./AtomicEditor/ui/resourceEditors/Scene3dResourceEditorBuilder.ts",
+        "./AtomicEditor/ui/resourceEditors/ShaderResourceEditorBuilder.ts",
         "./AtomicEditor/ui/resourceEditors/TextFileResourceEditorBuilder.ts",
         "./AtomicEditor/ui/resourceEditors/TurboBadgerResourceEditorBuilder.ts",
         "./AtomicEditor/ui/resourceEditors/TypescriptResourceEditorBuilder.ts",
         "./AtomicEditor/ui/resourceEditors/XMLResourceEditorBuilder.ts",
-        "./AtomicEditor/ui/resourceEditors/ShaderResourceEditorBuilder.ts",
         "./AtomicEditor/ui/ScriptWidget.ts",
         "./AtomicEditor/ui/Shortcuts.ts",
         "./AtomicEditor/ui/UIEvents.ts",

+ 6 - 0
Source/ToolCore/License/LicenseEvents.h

@@ -35,6 +35,12 @@ EVENT(E_LICENSE_EULAREQUIRED, LicenseEulaRequired)
 
 }
 
+// EULA agreement accepted
+EVENT(E_LICENSE_EULAACCEPTED, LicenseEulaAccepted)
+{
+
+}
+
 // activation required
 EVENT(E_LICENSE_ACTIVATIONREQUIRED, LicenseActivationRequired)
 {

+ 4 - 0
Source/ToolCore/License/LicenseSystem.cpp

@@ -96,6 +96,10 @@ void LicenseSystem::Initialize()
         SendEvent(E_LICENSE_EULAREQUIRED);
         return;
     }
+    else
+    {
+        SendEvent(E_LICENSE_EULAACCEPTED);
+    }
 
     // TODO: Cleanup for MIT