mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
清理场景窗口。
This commit is contained in:
parent
c53442e75e
commit
14cc5e7938
@ -696,5 +696,6 @@
|
||||
"preserveDrawingBuffer": "保留绘制缓冲区",
|
||||
"stencil": "模板",
|
||||
"Screenshot": "截图",
|
||||
"Video": "视频"
|
||||
"Video": "视频",
|
||||
"Clean Up Scenes": "清理场景"
|
||||
}
|
||||
@ -1,7 +1,6 @@
|
||||
import { classNames, PropTypes, MenuBar, MenuItem, MenuItemSeparator } from '../../third_party';
|
||||
import TextureGeneratorWindow from './window/TextureGeneratorWindow.jsx';
|
||||
import Converter from '../../serialization/Converter';
|
||||
import Ajax from '../../utils/Ajax';
|
||||
import CleanUpScenesWindow from './window/CleanUpScenesWindow.jsx';
|
||||
|
||||
/**
|
||||
* 工具菜单
|
||||
@ -15,6 +14,7 @@ class ToolMenu extends React.Component {
|
||||
this.handleArrangeMap = this.handleArrangeMap.bind(this);
|
||||
this.handleArrangeMesh = this.handleArrangeMesh.bind(this);
|
||||
this.handleArrangeThumbnail = this.handleArrangeThumbnail.bind(this);
|
||||
this.handleCleanUpScenes = this.handleCleanUpScenes.bind(this);
|
||||
this.handleExportEditor = this.handleExportEditor.bind(this);
|
||||
}
|
||||
|
||||
@ -25,6 +25,7 @@ class ToolMenu extends React.Component {
|
||||
<MenuItem title={_t('Arrange Map')} show={app.debug === true} onClick={this.handleArrangeMap}></MenuItem>
|
||||
<MenuItem title={_t('Arrange Mesh')} show={app.debug === true} onClick={this.handleArrangeMesh}></MenuItem>
|
||||
<MenuItem title={_t('Arrange Thumbnail')} show={app.debug === true} onClick={this.handleArrangeThumbnail}></MenuItem>
|
||||
<MenuItem title={_t('Clean Up Scenes')} show={app.debug === true} onClick={this.handleCleanUpScenes}></MenuItem>
|
||||
<MenuItemSeparator show={app.debug === true} />
|
||||
<MenuItem title={_t('Export Editor')} onClick={this.handleExportEditor}></MenuItem>
|
||||
</MenuItem>;
|
||||
@ -91,6 +92,11 @@ class ToolMenu extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
handleCleanUpScenes() {
|
||||
const win = app.createElement(CleanUpScenesWindow);
|
||||
app.addElement(win);
|
||||
}
|
||||
|
||||
handleExportEditor() {
|
||||
app.confirm({
|
||||
title: _t('Query'),
|
||||
|
||||
@ -0,0 +1,36 @@
|
||||
import './css/CleanUpScenesWindow.css';
|
||||
import { Window, Content, Buttons, Button } from '../../../third_party';
|
||||
|
||||
/**
|
||||
* 清理场景窗口
|
||||
* @author tengge / https://github.com/tengge1
|
||||
*/
|
||||
class CleanUpScenesWindow extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.handleClose = this.handleClose.bind(this);
|
||||
}
|
||||
|
||||
render() {
|
||||
return <Window
|
||||
className={'CleanUpScenesWindow'}
|
||||
title={_t('Clean Up Scenes')}
|
||||
style={{ width: '400px', height: '320px', }}
|
||||
mask={false}
|
||||
onClose={this.handleClose}>
|
||||
<Content>
|
||||
|
||||
</Content>
|
||||
<Buttons>
|
||||
<Button onClick={this.handleClose}>{_t('Close')}</Button>
|
||||
</Buttons>
|
||||
</Window>;
|
||||
}
|
||||
|
||||
handleClose() {
|
||||
app.removeElement(this);
|
||||
}
|
||||
}
|
||||
|
||||
export default CleanUpScenesWindow;
|
||||
@ -0,0 +1,11 @@
|
||||
.Window.CleanUpScenesWindow>.wrap>.content {
|
||||
left: 0;
|
||||
top: 24px;
|
||||
right: 0;
|
||||
bottom: 32px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.Window.CleanUpScenesWindow>.wrap>.content>.Form>.FormControl>.Label {
|
||||
width: 180px;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user