main menu-ish

This commit is contained in:
i do not exist 2026-08-06 09:15:58 +03:00
parent 8e97d52a2f
commit 7d4998601b
2 changed files with 17 additions and 24 deletions

View file

@ -1,6 +1,7 @@
(view :logo (bsp/s (exact/y 1 (text ~~ ~~~~~~~~~~~~))
(bsp/s (exact/y 1 (text ~~~~ ~ ~< ~~ v0.3.0 ~~))
(bsp/s (exact/y 1 (text ~~~~ ~ ~~~~~~~~~~~~)) (text dig?)))))
(view :logo (bsp/s (text ~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~)
(bsp/s (text ~~~~ ~ ~< ~~ heatwave is the new darkwave ~~)
(bsp/s (text ~~~~ ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~)
(text powered by tengri & dizzle\n)))))
(view :browse (bsp/s
(padding 3 1 :browse-title)
@ -13,15 +14,7 @@
:transport)
(mode :menu (name Menu) (info Mode selector.) (keys :axis/y :confirm)
(view (bg (g 16) (bsp/n
(bg (g 32) (max/xy 80 2 :transport))
(bsp/s
(max/y 3 (bg (g 80) :ports/out))
(bsp/n
(max/y 3 (bg (g 80) :ports/in))
(bg (g 30) (bsp/s
(max/y 6 :logo)
:dialog/menu))))))))
(view (bg (g 16) (bsp/s (bsp/w (bg (g 32) :logo) (bsp/e :ports/out (bsp/e :transport :ports/in))) :dialog/menu))))
(view :ports/out
(bsp/s (align/w (text L-AUDIO-OUT))
@ -78,9 +71,9 @@
(mode :track (keys :track))
(mode :scene (keys :scene))
(mode :mix (keys :mix))
(bsp/n :status (bsp/w :meters/output (bsp/e :meters/input (bsp/n :tracks/inputs
(view (bsp/n :status (bsp/w :meters/output (bsp/e :meters/input (bsp/n :tracks/inputs
(bsp/s :tracks/outputs (bsp/s :tracks/names (bsp/s :tracks/devices
(fill (either :mode/editor (bsp/e :scenes/names :editor) :scenes))))))))))
(fill (either :mode/editor (bsp/e :scenes/names :editor) :scenes)))))))))))
(keys :back (@escape back))
(keys :confirm (@enter confirm))

View file

@ -391,7 +391,7 @@ mod config {
*config.error.write().unwrap() = Some(format!("{e:?}").into());
panic!("{e:?}");
} else {
println!("config updated");
//println!("config updated");
},
Err(errors) => {
panic!("{errors:?}");
@ -403,7 +403,7 @@ mod config {
NotifyConfig::default().with_poll_interval(Duration::from_millis(250))
)?;
if let Some(mut path) = config.get_file() {
println!("watching: {path:?}");
//println!("watching: {path:?}");
watcher.watch(&path, RecursiveMode::NonRecursive)?;
*config.watch.write().unwrap() = Some(watcher);
Ok(())
@ -426,7 +426,7 @@ mod config {
/// Write initial contents of configuration.
pub fn init (&self) -> Usually<()> {
println!("\r\ninit {}", quanta::Clock::new().raw());
//println!("\r\ninit {}", quanta::Clock::new().raw());
self.clear();
self.load(Self::CONFIG, Self::DEFAULTS, |cfgs, dsl|{
cfgs.add(&dsl)?;
@ -1501,13 +1501,13 @@ mod draw {
.and_then(|m|self.config.get_mode(m))
.map(|mode|{
south!(
format!("Mode: {:?}", self.mode.as_ref()),
format!("Time: {}", self.config.stamp.load(Relaxed)),
iter_south(||mode.view.iter().enumerate().map(|(index, line)|{
format!("View #{index} {line}")
}))
).align_nw().draw(to)?;
//south!(
//format!("Mode: {:?}", self.mode.as_ref()),
//format!("Time: {}", self.config.stamp.load(Relaxed)),
//iter_south(||mode.view.iter().enumerate().map(|(index, line)|{
//format!("View #{index} {line}")
//}))
//).align_nw().draw(to)?;
for (index, dsl) in mode.view.iter().enumerate() {
if let Err(e) = self.interpret(to, dsl) {