import EditorUI = require("../EditorUI"); import ModalWindow = require("./ModalWindow"); class About extends ModalWindow { constructor() { super(); // we're not calling this.init here as it calls resizeToFitContent // and center, which screw up the generated About text being resized this.text = "About the Atomic Game Engine"; this.load("AtomicEditor/editor/ui/about.tb.txt"); this.age_license = this.getWidget("age_license"); this.thirdparty_license = this.getWidget("thirdparty_license"); this.externaltool_license = this.getWidget("externaltool_license"); this.about_text = this.getWidget("about_text"); var cache = Atomic.cache; var file = cache.getFile("AtomicEditor/eulas/atomic_game_engine_eula.txt"); this.age_license.text = file.readText(); file = cache.getFile("AtomicEditor/eulas/atomic_thirdparty_eula.txt"); this.thirdparty_license.text = file.readText(); file = cache.getFile("AtomicEditor/eulas/atomic_external_tools_eula.txt"); this.externaltool_license.text = file.readText(); this.about_text.text = this.generateAboutText(); var get_pro = this.getWidget("purchase_pro"); if (get_pro) { get_pro.onClick = function() { Atomic.fileSystem.systemOpen("https://store.atomicgameengine.com/site"); } } this.resizeToFitContent(); this.center(); this.getWidget("tabcontainer").value = 0; } handleWidgetEvent(ev: Atomic.UIWidgetEvent) { if (ev.type == Atomic.UI_EVENT_TYPE_CLICK) { var id = ev.target.id; if (id == "ok") { this.hide(); return true; } } } generateAboutText(): string { var text = ""; text += "\n\n"; text += "Version 0.1.p0\n\n"; text += "(c) 2014-2015 THUNDERBEAST GAMES LLC\n\n\n"; text += "Installed platforms and modules:\n\n"; if (ToolCore.licenseSystem.isStandardLicense()) { text += " \n\n\n"; text += "Available platforms and modules:\n\n \ \ \ \n\n\n"; } else { text += " \ \ \n\n"; } text += "Special Thanks:\n\n"; text += " The Urho3D Project - http://urho3d.github.io\n\n"; text += " Sami Vaarala - http://www.duktape.org"; return text; } age_license: Atomic.UIEditField; thirdparty_license: Atomic.UIEditField; externaltool_license: Atomic.UIEditField; about_text: Atomic.UIEditField; } export = About;