Sidebar.js 1012 B

123456789101112131415161718192021222324252627282930313233
  1. import { UITabbedPanel, UISpan } from './libs/ui.js';
  2. import { SidebarScene } from './Sidebar.Scene.js';
  3. import { SidebarProperties } from './Sidebar.Properties.js';
  4. import { SidebarAnimation } from './Sidebar.Animation.js';
  5. import { SidebarProject } from './Sidebar.Project.js';
  6. import { SidebarSettings } from './Sidebar.Settings.js';
  7. function Sidebar( editor ) {
  8. const strings = editor.strings;
  9. const container = new UITabbedPanel();
  10. container.setId( 'sidebar' );
  11. const scene = new UISpan().add(
  12. new SidebarScene( editor ),
  13. new SidebarProperties( editor ),
  14. new SidebarAnimation( editor )
  15. );
  16. const project = new SidebarProject( editor );
  17. const settings = new SidebarSettings( editor );
  18. container.addTab( 'scene', strings.getKey( 'sidebar/scene' ), scene );
  19. container.addTab( 'project', strings.getKey( 'sidebar/project' ), project );
  20. container.addTab( 'settings', strings.getKey( 'sidebar/settings' ), settings );
  21. container.select( 'scene' );
  22. return container;
  23. }
  24. export { Sidebar };