Menubar.Help.js 638 B

12345678910111213141516171819202122232425262728293031323334
  1. Menubar.Help = function ( editor ) {
  2. var menuConfig,
  3. optionsPanel;
  4. // event handlers
  5. function onSourcecodeOptionClick () {
  6. window.open( 'https://github.com/mrdoob/three.js/tree/master/editor', '_blank' )
  7. }
  8. function onAboutOptionClick () {
  9. window.open( 'http://threejs.org', '_blank' );
  10. }
  11. // configure menu contents
  12. with(UI.MenubarHelper) {
  13. menuConfig = [
  14. createOption( 'Source code', onSourcecodeOptionClick ),
  15. createOption( 'About', onAboutOptionClick )
  16. ];
  17. }
  18. optionsPanel = UI.MenubarHelper.createOptionsPanel( menuConfig );
  19. return UI.MenubarHelper.createMenuContainer( 'Help', optionsPanel );
  20. }