Menubar.File.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. Menubar.File = function ( signals ) {
  2. var container = new UI.Panel();
  3. container.setClass( 'menu' );
  4. var title = new UI.Panel();
  5. title.setTextContent( 'File' ).setColor( '#666' );
  6. title.setMargin( '0px' );
  7. title.setPadding( '8px' );
  8. container.add( title );
  9. //
  10. var options = new UI.Panel();
  11. options.setClass( 'options' );
  12. container.add( options );
  13. /*
  14. // open
  15. var option = new UI.Panel();
  16. option.setClass( 'option' );
  17. option.setTextContent( 'Open' );
  18. option.onClick( function () { alert( 'Open' ) } );
  19. options.add( option );
  20. */
  21. // reset scene
  22. var option = new UI.Panel();
  23. option.setClass( 'option' );
  24. option.setTextContent( 'Reset' );
  25. option.onClick( function () { signals.resetScene.dispatch(); } );
  26. options.add( option );
  27. // export geometry
  28. var option = new UI.Panel();
  29. option.setClass( 'option' );
  30. option.setTextContent( 'Export Geometry' );
  31. option.onClick( function () { signals.exportGeometry.dispatch(); } );
  32. options.add( option );
  33. // export scene
  34. var option = new UI.Panel();
  35. option.setClass( 'option' );
  36. option.setTextContent( 'Export Scene' );
  37. option.onClick( function () { signals.exportScene.dispatch(); } );
  38. options.add( option );
  39. /*
  40. // export OBJ
  41. var option = new UI.Panel();
  42. option.setClass( 'option' );
  43. option.setTextContent( 'Export OBJ' );
  44. option.onClick( function () { alert( 'Export OBJ' ) } );
  45. options.add( option );
  46. */
  47. //
  48. return container;
  49. }