mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
选项窗口。
This commit is contained in:
parent
cee2c61a3e
commit
a4f6db40fd
43
ShadowEditor.Web/src/editor/window/OptionsWindow.js
Normal file
43
ShadowEditor.Web/src/editor/window/OptionsWindow.js
Normal file
@ -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;
|
||||
@ -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;
|
||||
Loading…
x
Reference in New Issue
Block a user