Menubar.Help.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import { UIPanel, UIRow } from './libs/ui.js';
  2. function MenubarHelp( editor ) {
  3. var strings = editor.strings;
  4. var container = new UIPanel();
  5. container.setClass( 'menu' );
  6. var title = new UIPanel();
  7. title.setClass( 'title' );
  8. title.setTextContent( strings.getKey( 'menubar/help' ) );
  9. container.add( title );
  10. var options = new UIPanel();
  11. options.setClass( 'options' );
  12. container.add( options );
  13. // Source code
  14. var option = new UIRow();
  15. option.setClass( 'option' );
  16. option.setTextContent( strings.getKey( 'menubar/help/source_code' ) );
  17. option.onClick( function () {
  18. window.open( 'https://github.com/mrdoob/three.js/tree/master/editor', '_blank' );
  19. } );
  20. options.add( option );
  21. /*
  22. // Icon
  23. var option = new UIRow();
  24. option.setClass( 'option' );
  25. option.setTextContent( strings.getKey( 'menubar/help/icons' ) );
  26. option.onClick( function () {
  27. window.open( 'https://www.flaticon.com/packs/interface-44', '_blank' );
  28. } );
  29. options.add( option );
  30. */
  31. // About
  32. var option = new UIRow();
  33. option.setClass( 'option' );
  34. option.setTextContent( strings.getKey( 'menubar/help/about' ) );
  35. option.onClick( function () {
  36. window.open( 'https://threejs.org', '_blank' );
  37. } );
  38. options.add( option );
  39. return container;
  40. }
  41. export { MenubarHelp };