@@ -110,10 +110,10 @@ fn ui(items: MutableVec<Data>, rows: MutableVec<()>) -> JonmoBuilder {
110110 Text :: new ( "source" ) ,
111111 TextColor ( Color :: WHITE ) ,
112112 TextFont :: from_font_size ( 30. ) ,
113- TextLayout :: new_with_justify ( JustifyText :: Center ) ,
113+ TextLayout :: new_with_justify ( Justify :: Center ) ,
114114 ) ) )
115115 . child ( button ( "+" , -2. ) . apply ( on_click (
116- |_: Trigger < Pointer < Click > > ,
116+ |_: On < Pointer < Click > > ,
117117 datas : Res < Datas > ,
118118 mut mutable_vec_datas : Query < & mut MutableVecData < _ > > | {
119119 datas. 0 . write ( & mut mutable_vec_datas) . insert ( 0 , random_data ( ) ) ;
@@ -150,7 +150,7 @@ fn ui(items: MutableVec<Data>, rows: MutableVec<()>) -> JonmoBuilder {
150150 // BackgroundColor(Color::WHITE),
151151 ) )
152152 . child ( button ( "+" , -2. ) . apply ( on_click (
153- |_: Trigger < Pointer < Click > > , rows : Res < Rows > , mut mutable_vec_datas : Query < & mut MutableVecData < _ > > | {
153+ |_: On < Pointer < Click > > , rows : Res < Rows > , mut mutable_vec_datas : Query < & mut MutableVecData < _ > > | {
154154 rows. 0 . write ( & mut mutable_vec_datas) . push ( ( ) ) ;
155155 } ,
156156 ) ) ) ,
@@ -205,7 +205,7 @@ fn text_node(text: &'static str) -> JonmoBuilder {
205205 Node :: default ( ) ,
206206 Text :: new ( text) ,
207207 TextColor ( Color :: WHITE ) ,
208- TextLayout :: new_with_justify ( JustifyText :: Center ) ,
208+ TextLayout :: new_with_justify ( Justify :: Center ) ,
209209 BorderRadius :: all ( Val :: Px ( GAP ) ) ,
210210 ) )
211211}
@@ -237,7 +237,7 @@ fn number_toggle(row_parent: LazyEntity, parity: Parity) -> impl Fn(JonmoBuilder
237237 move |builder| {
238238 builder
239239 . apply ( on_click (
240- clone ! ( ( row_parent) move |_: Trigger <Pointer <Click >>, mut number_filters: Query <& mut NumberFilters >| {
240+ clone ! ( ( row_parent) move |_: On <Pointer <Click >>, mut number_filters: Query <& mut NumberFilters >| {
241241 toggle( & mut number_filters. get_mut( row_parent. get( ) ) . unwrap( ) . 0 , parity) ;
242242 } ) ,
243243 ) )
@@ -274,7 +274,7 @@ fn number_toggles(row_parent: LazyEntity) -> JonmoBuilder {
274274 . insert ( TextFont :: from_font_size ( 13. ) )
275275 . insert ( BackgroundColor ( bevy:: color:: palettes:: basic:: GRAY . into ( ) ) )
276276 . apply ( on_click (
277- clone ! ( ( row_parent) move |_: Trigger <Pointer <Click >>, world: & mut World | {
277+ clone ! ( ( row_parent) move |_: On <Pointer <Click >>, world: & mut World | {
278278 let mut entity = world. entity_mut( row_parent. get( ) ) ;
279279 if entity. take:: <Sorted >( ) . is_none( ) { entity. insert( Sorted ) ; }
280280 } ) ,
@@ -298,7 +298,7 @@ fn shape_toggle(row_parent: LazyEntity, shape: Shape) -> JonmoBuilder {
298298 BackgroundColor ( bevy:: color:: palettes:: basic:: GRAY . into ( ) ) ,
299299 ) )
300300 . apply ( on_click (
301- clone ! ( ( row_parent) move |_: Trigger <Pointer <Click >>, mut shape_filters: Query <& mut ShapeFilters >| {
301+ clone ! ( ( row_parent) move |_: On <Pointer <Click >>, mut shape_filters: Query <& mut ShapeFilters >| {
302302 toggle( & mut shape_filters. get_mut( row_parent. get( ) ) . unwrap( ) . 0 , shape) ;
303303 } ) ,
304304 ) )
@@ -342,10 +342,10 @@ fn color_toggles(row_parent: LazyEntity) -> JonmoBuilder {
342342 } ,
343343 BorderRadius :: all ( Val :: Px ( GAP ) ) ,
344344 BackgroundColor ( color. into ( ) ) ,
345- BorderColor ( Color :: BLACK ) ,
345+ BorderColor :: all ( Color :: BLACK ) ,
346346 ) )
347347 . apply ( on_click (
348- clone ! ( ( row_parent) move |_: Trigger <Pointer <Click >>, mut color_filters: Query <& mut ColorFilters >| {
348+ clone ! ( ( row_parent) move |_: On <Pointer <Click >>, mut color_filters: Query <& mut ColorFilters >| {
349349 toggle( & mut color_filters. get_mut( row_parent. get( ) ) . unwrap( ) . 0 , color) ;
350350 } ) ,
351351 ) )
@@ -370,7 +370,7 @@ fn button(text: &'static str, offset: f32) -> JonmoBuilder {
370370 ..default ( )
371371 } ,
372372 BackgroundColor ( bevy:: color:: palettes:: basic:: GRAY . into ( ) ) ,
373- BorderColor ( Color :: WHITE ) ,
373+ BorderColor :: all ( Color :: WHITE ) ,
374374 BorderRadius :: all ( Val :: Px ( GAP ) ) ,
375375 ) )
376376 . child (
@@ -402,11 +402,11 @@ fn row(index: impl Signal<Item = Option<usize>>, items: MutableVec<Data>) -> Jon
402402 button ( "-" , -3. )
403403 . component_signal ( index. map_in ( |index| index. map ( Index ) ) )
404404 . apply ( on_click (
405- |click : Trigger < Pointer < Click > > ,
405+ |click : On < Pointer < Click > > ,
406406 rows : Res < Rows > ,
407407 indices : Query < & Index > ,
408408 mut mutable_vec_datas : Query < & mut MutableVecData < _ > > | {
409- if let Ok ( & Index ( index) ) = indices. get ( click. target ( ) ) {
409+ if let Ok ( & Index ( index) ) = indices. get ( click. event ( ) . event_target ( ) ) {
410410 rows. 0 . write ( & mut mutable_vec_datas) . remove ( index) ;
411411 }
412412 } ,
@@ -504,11 +504,11 @@ fn item(index: impl Signal<Item = Option<usize>>, Data { number, color, shape }:
504504 ) )
505505 . component_signal ( index. map_in ( |index| index. map ( Index ) ) )
506506 . apply ( on_click (
507- |click : Trigger < Pointer < Click > > ,
507+ |click : On < Pointer < Click > > ,
508508 datas : Res < Datas > ,
509509 indices : Query < & Index > ,
510510 mut mutable_vec_datas : Query < & mut MutableVecData < _ > > | {
511- if let Ok ( & Index ( index) ) = indices. get ( click. target ( ) ) {
511+ if let Ok ( & Index ( index) ) = indices. get ( click. event ( ) . event_target ( ) ) {
512512 datas. 0 . write ( & mut mutable_vec_datas) . remove ( index) ;
513513 }
514514 } ,
@@ -517,7 +517,7 @@ fn item(index: impl Signal<Item = Option<usize>>, Data { number, color, shape }:
517517 Node :: default ( ) ,
518518 Text :: new ( number. to_string ( ) ) ,
519519 TextColor ( Color :: BLACK ) ,
520- TextLayout :: new_with_justify ( JustifyText :: Center ) ,
520+ TextLayout :: new_with_justify ( Justify :: Center ) ,
521521 ) )
522522}
523523
0 commit comments