Skip to content

Commit d298c5c

Browse files
committed
refs #144, fix kb for languages
1 parent a8be2cc commit d298c5c

File tree

8 files changed

+10
-9
lines changed

8 files changed

+10
-9
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/notation_kb/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,3 @@ native = [
2121
[dependencies]
2222
notation_bevy = { path = "../../crates/notation_bevy" }
2323
notation_viewer = { path = "../notation_viewer" }
24-
clap = { version = "3.0.12", features = [ "derive" ] }
File renamed without changes.

apps/notation_kb/src/kb.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ impl NotationKnowledgeBase {
2929
.with_system(Self::on_window_resized)
3030
);
3131
}
32-
pub fn run<A: ExtraAssets>() {
33-
notation_bevy::prelude::NotationApp::run_with_extra::<A, _>(vec![], Self::extra);
32+
pub fn run<A: ExtraAssets>(args: NotationArgs) {
33+
notation_bevy::prelude::NotationApp::run_with_extra::<A, _>(args, Self::extra);
3434
}
3535
fn setup_state(
3636
mut state: ResMut<NotationState>,

apps/notation_kb/src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
use notation_bevy::bevy::prelude::bevy_main;
1+
use notation_bevy::{bevy::prelude::bevy_main, prelude::NotationArgs};
22

33
use notation_kb::assets::NotationKnowledgeBaseAssets;
44

55
#[bevy_main]
66
fn main() {
7-
notation_kb::kb::NotationKnowledgeBase::run::<NotationKnowledgeBaseAssets>();
7+
let args = NotationArgs::parse_args();
8+
notation_kb::kb::NotationKnowledgeBase::run::<NotationKnowledgeBaseAssets>(args);
89
}
910

apps/notation_kb/src/theory/scale.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl ScalePage {
146146
ProtoForm{ sections: vec!["notes".to_owned()]},
147147
)
148148
}
149-
pub fn check_reload(&self, tab: &Tab) -> bool {
149+
pub fn check_reload(&self, tab: &notation_bevy::prelude::Tab) -> bool {
150150
self.scale != tab.meta.scale || self.key != tab.meta.key || tab.bars.len() == 0
151151
}
152152
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cargo run --features native -- --lang zh-CN

crates/notation_dsl/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#[macro_use]
44
extern crate lazy_static;
55

6+
pub use notation_proto;
7+
68
pub use {proc_macro2, quote, syn};
79

810
pub mod context;
@@ -13,6 +15,7 @@ pub mod helper;
1315
pub mod proto;
1416
pub mod util;
1517

18+
1619
pub mod prelude {
1720
#[doc(hidden)]
1821
pub use crate::get_tab::GetTabDsl;
@@ -34,6 +37,4 @@ pub mod prelude {
3437
pub use crate::proto::track::TrackDsl;
3538
#[doc(hidden)]
3639
pub use crate::context::Context;
37-
#[doc(hidden)]
38-
pub use notation_proto::prelude::*;
3940
}

0 commit comments

Comments
 (0)