Menubar.Help.js 981 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /**
  2. * @author mrdoob / http://mrdoob.com/
  3. */
  4. Menubar.Help = function ( editor ) {
  5. var strings = editor.strings;
  6. var container = new UI.Panel();
  7. container.setClass( 'menu' );
  8. var title = new UI.Panel();
  9. title.setClass( 'title' );
  10. title.setTextContent( strings.getKey( 'menubar/help' ) );
  11. container.add( title );
  12. var options = new UI.Panel();
  13. options.setClass( 'options' );
  14. container.add( options );
  15. // Source code
  16. var option = new UI.Row();
  17. option.setClass( 'option' );
  18. option.setTextContent( strings.getKey( 'menubar/help/source_code' ) );
  19. option.onClick( function () {
  20. window.open( 'https://github.com/mrdoob/three.js/tree/master/editor', '_blank' )
  21. } );
  22. options.add( option );
  23. // About
  24. var option = new UI.Row();
  25. option.setClass( 'option' );
  26. option.setTextContent( strings.getKey( 'menubar/help/about' ) );
  27. option.onClick( function () {
  28. window.open( 'http://threejs.org', '_blank' );
  29. } );
  30. options.add( option );
  31. return container;
  32. };