Sidebar.js 1.2 KB

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