diff --git a/ShadowEditor.Web/locales/zh-CN.json b/ShadowEditor.Web/locales/zh-CN.json index 3e7785fa..24d22fb9 100644 --- a/ShadowEditor.Web/locales/zh-CN.json +++ b/ShadowEditor.Web/locales/zh-CN.json @@ -696,5 +696,6 @@ "preserveDrawingBuffer": "保留绘制缓冲区", "stencil": "模板", "Screenshot": "截图", - "Video": "视频" + "Video": "视频", + "Clean Up Scenes": "清理场景" } \ No newline at end of file diff --git a/ShadowEditor.Web/src/editor/menu/ToolMenu.jsx b/ShadowEditor.Web/src/editor/menu/ToolMenu.jsx index 87c6e0f6..6f326c5d 100644 --- a/ShadowEditor.Web/src/editor/menu/ToolMenu.jsx +++ b/ShadowEditor.Web/src/editor/menu/ToolMenu.jsx @@ -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 { + ; @@ -91,6 +92,11 @@ class ToolMenu extends React.Component { }); } + handleCleanUpScenes() { + const win = app.createElement(CleanUpScenesWindow); + app.addElement(win); + } + handleExportEditor() { app.confirm({ title: _t('Query'), diff --git a/ShadowEditor.Web/src/editor/menu/window/CleanUpScenesWindow.jsx b/ShadowEditor.Web/src/editor/menu/window/CleanUpScenesWindow.jsx new file mode 100644 index 00000000..0124b3fa --- /dev/null +++ b/ShadowEditor.Web/src/editor/menu/window/CleanUpScenesWindow.jsx @@ -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 + + + + + + + ; + } + + handleClose() { + app.removeElement(this); + } +} + +export default CleanUpScenesWindow; \ No newline at end of file diff --git a/ShadowEditor.Web/src/editor/menu/window/css/CleanUpScenesWindow.css b/ShadowEditor.Web/src/editor/menu/window/css/CleanUpScenesWindow.css new file mode 100644 index 00000000..2da22897 --- /dev/null +++ b/ShadowEditor.Web/src/editor/menu/window/css/CleanUpScenesWindow.css @@ -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; +} \ No newline at end of file