You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
1.5 KiB
73 lines
1.5 KiB
import { UIPanel, UIRow } from '../libs/ui.js';
|
|
|
|
function MenubarHelp( editor ) {
|
|
|
|
const strings = editor.strings;
|
|
|
|
const container = new UIPanel();
|
|
container.setClass( 'menu' );
|
|
|
|
const title = new UIPanel();
|
|
title.setClass( 'title' );
|
|
title.setTextContent( strings.getKey( 'menubar/help' ) );
|
|
container.add( title );
|
|
|
|
const options = new UIPanel();
|
|
options.setClass( 'options' );
|
|
container.add( options );
|
|
|
|
// Source code
|
|
|
|
let option = new UIRow();
|
|
option.setClass( 'option' );
|
|
option.setTextContent( strings.getKey( 'menubar/help/source_code' ) );
|
|
option.onClick( function () {
|
|
|
|
window.open( 'https://github.com/mrdoob/three.js/tree/master/editor', '_blank' );
|
|
|
|
} );
|
|
options.add( option );
|
|
|
|
/*
|
|
// Icon
|
|
|
|
let option = new UIRow();
|
|
option.setClass( 'option' );
|
|
option.setTextContent( strings.getKey( 'menubar/help/icons' ) );
|
|
option.onClick( function () {
|
|
|
|
window.open( 'https://www.flaticon.com/packs/interface-44', '_blank' );
|
|
|
|
} );
|
|
options.add( option );
|
|
*/
|
|
|
|
// About
|
|
|
|
option = new UIRow();
|
|
option.setClass( 'option' );
|
|
option.setTextContent( strings.getKey( 'menubar/help/about' ) );
|
|
option.onClick( function () {
|
|
|
|
window.open( 'https://threejs.org', '_blank' );
|
|
|
|
} );
|
|
options.add( option );
|
|
|
|
// Manual
|
|
|
|
option = new UIRow();
|
|
option.setClass( 'option' );
|
|
option.setTextContent( strings.getKey( 'menubar/help/manual' ) );
|
|
option.onClick( function () {
|
|
|
|
window.open( 'https://github.com/mrdoob/three.js/wiki/Editor-Manual', '_blank' );
|
|
|
|
} );
|
|
options.add( option );
|
|
|
|
return container;
|
|
|
|
}
|
|
|
|
export { MenubarHelp };
|
|
|