Skip to main content

draw_scene_tabs

Function draw_scene_tabs 

Source
fn draw_scene_tabs(
    ui: &mut Ui,
    open_scenes: &[(PathBuf, bool)],
    active_scene: usize,
    requests: &mut UiRequests,
)
Expand description

Tab strip for the project’s open scenes (EditorScene::open_scenes), one tab per scene kept loaded in memory — clicking a tab switches to it instantly (no reload: unlike the old single-scene behavior, an opened scene stays fully loaded until its tab is closed). Each tab’s bool marks it dirty (unsaved edits — see EditorScene::OpenScene::dirty), shown as a trailing * on its label. The close button (“x”) removes a tab (autosaving it first, handled by EditorScene::close_scene_tab), except when it’s the only one open — closing while Playing (if it’s the active tab) stops Play first, same as switching does, so no separate disabled state is needed here.