Menubar.Help.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. // Icon
  22. var option = new UIRow();
  23. option.setClass( 'option' );
  24. option.setTextContent( strings.getKey( 'menubar/help/icons' ) );
  25. option.onClick( function () {
  26. window.open( 'https://www.flaticon.com/packs/interface-44', '_blank' );
  27. } );
  28. options.add( option );
  29. // About
  30. var option = new UIRow();
  31. option.setClass( 'option' );
  32. option.setTextContent( strings.getKey( 'menubar/help/about' ) );
  33. option.onClick( function () {
  34. window.open( 'http://threejs.org', '_blank' );
  35. } );
  36. options.add( option );
  37. return container;
  38. }
  39. export { MenubarHelp };