|
@@ -6,15 +6,13 @@ extern crate rodio;
|
|
|
mod base;
|
|
|
use base::*;
|
|
|
// use rodio::Source;
|
|
|
-use walkdir::WalkDir;
|
|
|
use imgui::*;
|
|
|
+use walkdir::WalkDir;
|
|
|
mod support;
|
|
|
-use log::*;
|
|
|
use env_logger;
|
|
|
-
|
|
|
+use log::*;
|
|
|
|
|
|
fn main() {
|
|
|
-
|
|
|
env_logger::init();
|
|
|
let mut sounds = vec![];
|
|
|
|
|
@@ -25,7 +23,7 @@ fn main() {
|
|
|
{
|
|
|
match Sound::new(&entry.path().to_string_lossy().to_string()) {
|
|
|
Ok(s) => sounds.push(s),
|
|
|
- Err(e) => error!("{:?} while opening {:?}", e, entry)
|
|
|
+ Err(e) => error!("{:?} while opening {:?}", e, entry),
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -34,11 +32,9 @@ fn main() {
|
|
|
let mut bar = Bar::default();
|
|
|
bar.bpm = 160;
|
|
|
bar.repeat = 2;
|
|
|
-
|
|
|
|
|
|
let system = support::init(file!());
|
|
|
|
|
|
-
|
|
|
system.main_loop(|_, ui| {
|
|
|
Window::new(im_str!("sources"))
|
|
|
// .resizable(false)
|
|
@@ -47,15 +43,15 @@ fn main() {
|
|
|
// .always_auto_resize(true)
|
|
|
.size([300.0, 300.0], Condition::FirstUseEver)
|
|
|
.build(ui, || {
|
|
|
-
|
|
|
+ // let mut s = ui.clone_style();
|
|
|
+ // ui.show_style_editor(&mut s);
|
|
|
+
|
|
|
ui.tree_node(im_str!("Tree")).build(|| {
|
|
|
for s in &sounds {
|
|
|
ui.tree_node(&im_str!("{}", s.name)).build(|| {
|
|
|
ui.text(im_str!("blah blah"));
|
|
|
ui.same_line(0.0);
|
|
|
- if ui.small_button(im_str!("add")) {
|
|
|
-
|
|
|
- }
|
|
|
+ if ui.small_button(im_str!("add")) {}
|
|
|
ui.same_line(0.0);
|
|
|
if ui.small_button(im_str!("play")) {
|
|
|
s.play(&dev);
|
|
@@ -63,10 +59,9 @@ fn main() {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
});
|
|
|
|
|
|
- Window::new(im_str!("Hello world"))
|
|
|
+ Window::new(im_str!("Hello world"))
|
|
|
.size([300.0, 100.0], Condition::FirstUseEver)
|
|
|
.build(ui, || {
|
|
|
ui.text(im_str!("bars"));
|
|
@@ -75,13 +70,6 @@ fn main() {
|
|
|
ui.same_line(0.0);
|
|
|
ui.small_button(&im_str!("{}", i));
|
|
|
}
|
|
|
-
|
|
|
});
|
|
|
-
|
|
|
-
|
|
|
});
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-}
|
|
|
+}
|