Menubar.Help.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. import { UIPanel, UIRow } from './libs/ui.js';
  2. function MenubarHelp( editor ) {
  3. const strings = editor.strings;
  4. const container = new UIPanel();
  5. container.setClass( 'menu' );
  6. const title = new UIPanel();
  7. title.setClass( 'title' );
  8. title.setTextContent( strings.getKey( 'menubar/help' ) );
  9. container.add( title );
  10. const options = new UIPanel();
  11. options.setClass( 'options' );
  12. container.add( options );
  13. // Source code
  14. let 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. let 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. 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. // Manual
  40. option = new UIRow();
  41. option.setClass( 'option' );
  42. option.setTextContent( strings.getKey( 'menubar/help/manual' ) );
  43. option.onClick( function () {
  44. window.open( 'https://github.com/mrdoob/three.js/wiki/Editor-Manual', '_blank' );
  45. } );
  46. options.add( option );
  47. return container;
  48. }
  49. export { MenubarHelp };