From a4f6db40fdcaa03c11ea964d2ebd910f6ef92151 Mon Sep 17 00:00:00 2001 From: liteng <930372551@qq.com> Date: Mon, 20 Aug 2018 07:51:58 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E9=A1=B9=E7=AA=97=E5=8F=A3=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/editor/window/OptionsWindow.js | 43 +++++++++++++++++++ .../src/event/menu/tool/OptionsEvent.js | 7 ++- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 ShadowEditor.Web/src/editor/window/OptionsWindow.js diff --git a/ShadowEditor.Web/src/editor/window/OptionsWindow.js b/ShadowEditor.Web/src/editor/window/OptionsWindow.js new file mode 100644 index 00000000..07a4f416 --- /dev/null +++ b/ShadowEditor.Web/src/editor/window/OptionsWindow.js @@ -0,0 +1,43 @@ +import UI from '../../ui/UI'; +import Ajax from '../../utils/Ajax'; +import AddObjectCommand from '../../command/AddObjectCommand'; +import UploadUtils from '../../utils/UploadUtils'; + +/** + * 选项窗口 + * @param {*} options + */ +function OptionsWindow(options) { + UI.Control.call(this, options); + this.app = options.app; +} + +OptionsWindow.prototype = Object.create(UI.Control.prototype); +OptionsWindow.prototype.constructor = OptionsWindow; + +OptionsWindow.prototype.render = function () { + var _this = this; + + var container = UI.create({ + xtype: 'window', + id: 'optionsWindow', + parent: this.app.container, + title: '选项窗口', + width: '700px', + height: '500px', + bodyStyle: { + paddingTop: 0 + }, + shade: false, + children: [ + + ] + }); + container.render(); +}; + +OptionsWindow.prototype.show = function () { + UI.get('optionsWindow').show(); +}; + +export default OptionsWindow; \ No newline at end of file diff --git a/ShadowEditor.Web/src/event/menu/tool/OptionsEvent.js b/ShadowEditor.Web/src/event/menu/tool/OptionsEvent.js index 82391b87..69507105 100644 --- a/ShadowEditor.Web/src/event/menu/tool/OptionsEvent.js +++ b/ShadowEditor.Web/src/event/menu/tool/OptionsEvent.js @@ -1,4 +1,5 @@ import MenuEvent from '../MenuEvent'; +import OptionsWindow from '../../../editor/window/OptionsWindow'; /** * 选项菜单事件 @@ -21,7 +22,11 @@ OptionsEvent.prototype.stop = function () { }; OptionsEvent.prototype.onOptions = function () { - debugger + if (this.window === undefined) { + this.window = new OptionsWindow({ app: this.app }); + this.window.render(); + } + this.window.show(); }; export default OptionsEvent; \ No newline at end of file