mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
show rich cells
This commit is contained in:
parent
69832723b3
commit
39c44d1e67
3 changed files with 35 additions and 18 deletions
|
|
@ -16,10 +16,10 @@ render!(TuiOut: (self: Arranger) => {
|
|||
(8, 20, self.scene_row_headers(), self.scene_row_cells()),
|
||||
(25, 2, self.input_row_header(), self.input_row_cells()),
|
||||
].into_iter(),
|
||||
move|(y, h, header, cells), index|map_south(y, h, Fill::x(Align::w(Bsp::e(
|
||||
Fixed::xy(scenes_w, h, header),
|
||||
Fixed::xy(self.tracks.len() as u16*6, h, cells)
|
||||
)))));
|
||||
move|(y, h, header, cells), index|map_south_west(y, h, Align::w(Bsp::a(
|
||||
Align::w(Fixed::xy(scenes_w, h, header)),
|
||||
Align::w(Push::x(scenes_w, Fixed::xy(self.tracks.len() as u16*12, h, cells)))
|
||||
))));
|
||||
|
||||
self.size.of(toolbar(pool(editing(Bsp::s(arrrrrr, enclosed(&self.editor))))))
|
||||
|
||||
|
|
@ -167,14 +167,18 @@ impl Arranger {
|
|||
let color = scene.color();
|
||||
let cell = Self::phat_sel_3(
|
||||
selected_scene == Some(i),
|
||||
Push::x(1, name.clone()),
|
||||
Push::x(1, name),
|
||||
Push::x(1, Tui::bold(true, name.clone())),
|
||||
Push::x(1, Tui::bold(true, name)),
|
||||
if selected_scene.map(|s|s + 1) == Some(i) {
|
||||
None
|
||||
} else {
|
||||
Some(last_color.read().unwrap().base.rgb)
|
||||
},
|
||||
color.base.rgb,
|
||||
if selected_scene == Some(i) {
|
||||
color.light.rgb
|
||||
} else {
|
||||
color.base.rgb
|
||||
},
|
||||
Color::Rgb(0, 0, 0)
|
||||
);
|
||||
*last_color.write().unwrap() = color;
|
||||
|
|
@ -195,18 +199,23 @@ impl Arranger {
|
|||
};
|
||||
map_east(x1 as u16, w, Fixed::x(w, Tui::bg(Color::Rgb(0,0,0), Fill::y(Map::new(
|
||||
||self.scenes_with_heights(2),
|
||||
move|(_, scene, y1, y2), i| {
|
||||
let h = (y2 - y1) as u16;
|
||||
move|(_, scene, y1, y2), j| {
|
||||
let h = (y2 - y1) as u16;
|
||||
let color = scene.color();
|
||||
let name = format!("🭬{}", &scene.name);
|
||||
//*last_color.write().unwrap() = color
|
||||
map_south(y1 as u16, 2, Fill::x(Self::phat_cell_3(
|
||||
Tui::fg(TuiTheme::g(64), " ⏹ "),
|
||||
let name = "⏹ ";
|
||||
let cell = Self::phat_sel_3(
|
||||
selected_track == Some(i) && selected_scene == Some(j),
|
||||
Tui::fg(TuiTheme::g(64), Push::x(1, name)),
|
||||
Tui::fg(TuiTheme::g(64), Push::x(1, name)),
|
||||
if selected_track == Some(i) && selected_scene.map(|s|s+1) == Some(j) {
|
||||
None
|
||||
} else {
|
||||
Some(TuiTheme::g(32).into())
|
||||
},
|
||||
TuiTheme::g(32).into(),
|
||||
TuiTheme::g(32).into(),
|
||||
TuiTheme::g(32).into(),
|
||||
//Tui::fg(TuiTheme::g(64), " ⏺ ")
|
||||
)))
|
||||
);
|
||||
map_south(y1 as u16, 3, Fill::x(cell))
|
||||
}
|
||||
))).boxed()
|
||||
))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue