Menubar.View.js 606 B

123456789101112131415161718192021222324252627282930313233
  1. import { UIPanel, UIRow } from './libs/ui.js';
  2. function MenubarView( editor ) {
  3. var container = new UIPanel();
  4. container.setClass( 'menu' );
  5. var title = new UIPanel();
  6. title.setClass( 'title' );
  7. title.setTextContent( 'View' );
  8. container.add( title );
  9. var options = new UIPanel();
  10. options.setClass( 'options' );
  11. container.add( options );
  12. // VR mode
  13. var option = new UIRow();
  14. option.setClass( 'option' );
  15. option.setTextContent( 'VR mode' );
  16. option.onClick( function () {
  17. editor.signals.enterVR.dispatch();
  18. } );
  19. options.add( option );
  20. return container;
  21. }
  22. export { MenubarView };