some more highlighting and new place for editor status
Some checks are pending
/ build (push) Waiting to run

This commit is contained in:
🪞👃🪞 2025-05-17 12:29:41 +03:00
parent 48603e4812
commit 3f1a2fee80
2 changed files with 9 additions and 6 deletions

View file

@ -325,12 +325,16 @@ pub trait ScenesView: HasSelection + HasSceneScroll + Send + Sync {
fn view_scenes_names (&self) -> impl Content<TuiOut> {
Stack::south(move|add: &mut dyn FnMut(&dyn Render<TuiOut>)|{
for (index, scene) in self.scenes().iter().enumerate().skip(self.scene_scroll()) {
add(&Self::view_scene_name(index, scene));
add(&self.view_scene_name(index, scene));
}
})
}
fn view_scene_name (index: usize, scene: &Scene) -> impl Content<TuiOut> {
Fixed::xy(20, 2, Tui::bg(scene.color.dark.rgb, Align::nw(Bsp::e(
fn view_scene_name (&self, index: usize, scene: &Scene) -> impl Content<TuiOut> {
Fixed::xy(20, 2, Tui::bg(if self.selection().scene() == Some(index) {
scene.color.light.rgb
} else {
scene.color.base.rgb
}, Align::nw(Bsp::e(
format!(" {index:2} "),
Tui::fg(Rgb(255, 255, 255),
Tui::bold(true, format!("{}", scene.name)))))))