@@ -51,7 +51,7 @@ struct Selectable;
51
51
#[ derive( Bundle ) ]
52
52
struct InteractableBundle {
53
53
#[ bundle]
54
- text_bundle : TextBundle ,
54
+ text_bundle : Text2dBundle ,
55
55
selectable : Selectable ,
56
56
rainbow : Rainbow ,
57
57
cycle_color_events : Events < CycleColorAction > ,
@@ -62,7 +62,7 @@ impl InteractableBundle {
62
62
// FIXME: fix position
63
63
fn new ( x : f32 , y : f32 , font_handle : & Handle < Font > ) -> Self {
64
64
InteractableBundle {
65
- text_bundle : TextBundle {
65
+ text_bundle : Text2dBundle {
66
66
text : Text :: with_section (
67
67
"0" ,
68
68
TextStyle {
@@ -134,19 +134,19 @@ struct AddNumberAction {
134
134
135
135
fn setup ( mut commands : Commands , asset_server : Res < AssetServer > ) {
136
136
// Don't forget to include a camera!
137
- commands. spawn_bundle ( UiCameraBundle :: default ( ) ) ;
137
+ commands. spawn_bundle ( OrthographicCameraBundle :: new_2d ( ) ) ;
138
138
139
139
let font_handle = asset_server. load ( "fonts/FiraSans-Bold.ttf" ) ;
140
140
// Spawns the first entity, and grabs the Entity id that is being allocated
141
141
let first_entity = commands
142
- . spawn_bundle ( InteractableBundle :: new ( -200.0 , 400 .0, & font_handle) )
142
+ . spawn_bundle ( InteractableBundle :: new ( -200.0 , 0 .0, & font_handle) )
143
143
. id ( ) ;
144
144
commands. insert_resource ( Selected {
145
145
entity : first_entity,
146
146
} ) ;
147
147
148
- commands. spawn_bundle ( InteractableBundle :: new ( 0.0 , 400 .0, & font_handle) ) ;
149
- commands. spawn_bundle ( InteractableBundle :: new ( 200.0 , 400 .0, & font_handle) ) ;
148
+ commands. spawn_bundle ( InteractableBundle :: new ( 0.0 , 0 .0, & font_handle) ) ;
149
+ commands. spawn_bundle ( InteractableBundle :: new ( 200.0 , 0 .0, & font_handle) ) ;
150
150
}
151
151
152
152
enum CycleBehavior {
0 commit comments