@@ -2,8 +2,10 @@ use std::sync::Arc;
22
33use bevy:: prelude:: * ;
44use notation_bevy_utils:: prelude:: ShapeOp ;
5+ use notation_model:: lane_kind:: LaneKind ;
56
67use crate :: chord:: chord_view:: ChordView ;
8+ use crate :: lane:: lane_layout:: LaneLayoutData ;
79use crate :: prelude:: {
810 BevyUtil , ChordBundle , EntryBundle , LyricsPlugin , NotationAssets , NotationAssetsStates ,
911 NotationSettings , NotationTheme , ShapesPlugin , StringsPlugin , ToneBundle ,
@@ -36,32 +38,34 @@ pub fn create_entry(
3638 assets : & NotationAssets ,
3739 theme : & NotationTheme ,
3840 settings : & NotationSettings ,
39- entity : Entity ,
41+ lane_layout : & LaneLayoutData ,
42+ lane_entity : Entity ,
4043 entry : & Arc < LaneEntry > ,
4144) {
4245 let entry_bundle = EntryBundle :: from ( entry. clone ( ) ) ;
43- let entry_entity = BevyUtil :: spawn_child_bundle ( commands, entity , entry_bundle) ;
44- insert_entry_extra ( commands, assets, theme, settings, entry_entity, entry) ;
46+ let entry_entity = BevyUtil :: spawn_child_bundle ( commands, lane_entity , entry_bundle) ;
47+ insert_entry_extra ( commands, assets, theme, settings, lane_layout , entry_entity, entry) ;
4548}
4649
4750fn insert_entry_extra (
4851 commands : & mut Commands ,
4952 assets : & NotationAssets ,
5053 theme : & NotationTheme ,
5154 settings : & NotationSettings ,
52- entity : Entity ,
55+ lane_layout : & LaneLayoutData ,
56+ entry_entity : Entity ,
5357 entry : & LaneEntry ,
5458) {
5559 match entry. model . proto . as_ref ( ) {
5660 ProtoEntry :: Core ( core_entry) => {
57- insert_core_entry_extra ( commands, assets, theme, settings, entity , entry, core_entry)
61+ insert_core_entry_extra ( commands, assets, theme, settings, lane_layout . lane_kind , entry_entity , entry, core_entry)
5862 }
5963 ProtoEntry :: Lyric ( lyric_entry) => LyricsPlugin :: insert_entry_extra (
6064 commands,
6165 assets,
6266 theme,
6367 settings,
64- entity ,
68+ entry_entity ,
6569 entry,
6670 lyric_entry,
6771 ) ,
@@ -71,7 +75,7 @@ fn insert_entry_extra(
7175 assets,
7276 theme,
7377 settings,
74- entity ,
78+ entry_entity ,
7579 entry,
7680 fretted_entry,
7781 ) ;
@@ -80,7 +84,8 @@ fn insert_entry_extra(
8084 assets,
8185 theme,
8286 settings,
83- entity,
87+ lane_layout. lane_kind ,
88+ entry_entity,
8489 entry,
8590 fretted_entry,
8691 ) ;
@@ -91,7 +96,7 @@ fn insert_entry_extra(
9196 assets,
9297 theme,
9398 settings,
94- entity ,
99+ entry_entity ,
95100 entry,
96101 fretted_entry,
97102 ) ;
@@ -100,7 +105,8 @@ fn insert_entry_extra(
100105 assets,
101106 theme,
102107 settings,
103- entity,
108+ lane_layout. lane_kind ,
109+ entry_entity,
104110 entry,
105111 fretted_entry,
106112 ) ;
@@ -114,6 +120,7 @@ fn insert_core_entry_extra(
114120 assets : & NotationAssets ,
115121 theme : & NotationTheme ,
116122 settings : & NotationSettings ,
123+ lane_kind : LaneKind ,
117124 entity : Entity ,
118125 entry : & LaneEntry ,
119126 core_entry : & CoreEntry ,
@@ -126,7 +133,7 @@ fn insert_core_entry_extra(
126133 . entity ( entity)
127134 . insert_bundle ( ToneBundle :: from ( * tone) ) ;
128135 crate :: tone:: tone_systems:: create_tone_notes (
129- commands, assets, theme, settings, entity, entry, tone,
136+ commands, assets, theme, settings, lane_kind . into ( ) , entity, entry, tone,
130137 ) ;
131138 }
132139 CoreEntry :: Chord ( chord, _) => {
0 commit comments