视图菜单。

This commit is contained in:
tengge1 2020-02-15 08:34:44 +08:00
parent 0bb37c4af4
commit 2aaf57beff
3 changed files with 50 additions and 1 deletions

View File

@ -1006,5 +1006,8 @@
"Please click the sky ball in the MapPanel.": "请点击贴图面板中的天空球。",
"Sky Ball": "天空球",
"The map you clicked is not sky ball.": "你点击的贴图不是天空球。",
"Clear Tools": "清空工具"
"Clear Tools": "清空工具",
"View": "视图",
"Stats": "性能监视器",
"Camera View": "视角帮助器"
}

View File

@ -9,6 +9,7 @@ import ComponentMenu from './ComponentMenu.jsx';
import PlayMenu from './PlayMenu.jsx';
import VisualMenu from './VisualMenu.jsx';
import ToolMenu from './ToolMenu.jsx';
import ViewMenu from './ViewMenu.jsx';
import ExampleMenu from './ExampleMenu.jsx';
import OptionsMenu from './OptionsMenu.jsx';
import SystemMenu from './SystemMenu.jsx';
@ -38,6 +39,7 @@ class EditorMenuBar extends React.Component {
{/* {!enableAuthority || isAdmin ? <VisualMenu /> : null} */}
{!enableAuthority || isAdmin ? <ExampleMenu /> : null}
{!enableAuthority || isAdmin ? <ToolMenu /> : null}
<ViewMenu />
<OptionsMenu />
<HelpMenu />
<MenuItemSeparator direction={'horizontal'} />

View File

@ -0,0 +1,44 @@
import { MenuItem, MenuItemSeparator } from '../../third_party';
/**
* 视图菜单
* @author tengge / https://github.com/tengge1
*/
class ViewMenu extends React.Component {
constructor(props) {
super(props);
this.handleShowStats = this.handleShowStats.bind(this);
this.handleShowGrid = this.handleShowGrid.bind(this);
this.handleShowView = this.handleShowView.bind(this);
}
render() {
return <MenuItem title={_t('View')}>
<MenuItem title={_t('Stats')}
onClick={this.handleShowStats}
/>
<MenuItem title={_t('Grid')}
onClick={this.handleShowGrid}
/>
<MenuItem title={_t('Camera View')}
onClick={this.handleShowView}
/>
<MenuItemSeparator />
</MenuItem>;
}
handleShowStats() {
}
handleShowGrid() {
}
handleShowView() {
}
}
export default ViewMenu;