|
|
|
|
@ -239,7 +239,6 @@ fn setup_play(mut commands: Commands, server: Res<AssetServer>) {
|
|
|
|
|
.observe(button_hover_on)
|
|
|
|
|
.observe(button_hover_off)
|
|
|
|
|
.observe(audio::toggle_music);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
parent
|
|
|
|
|
.spawn((
|
|
|
|
|
@ -247,19 +246,24 @@ fn setup_play(mut commands: Commands, server: Res<AssetServer>) {
|
|
|
|
|
BackgroundColor(BLACK.with_alpha(0.9).into()),
|
|
|
|
|
Node {
|
|
|
|
|
margin: UiRect::all(Val::Px(5.0)),
|
|
|
|
|
padding: UiRect::all(Val::Px(10.0)),
|
|
|
|
|
padding: UiRect::all(Val::Px(5.0)),
|
|
|
|
|
border: UiRect::all(Val::Px(1.0)),
|
|
|
|
|
height: Val::Px(40.0),
|
|
|
|
|
..default()
|
|
|
|
|
},
|
|
|
|
|
BorderColor(WHITE.into()),
|
|
|
|
|
GlobalZIndex(1),
|
|
|
|
|
))
|
|
|
|
|
.with_children(|parent| {
|
|
|
|
|
parent.spawn(Text("Set!".to_string()));
|
|
|
|
|
parent.spawn(ImageNode {
|
|
|
|
|
image: server.load("kenney_game-icons/PNG/White/1x/question.png"),
|
|
|
|
|
..default()
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
.observe(button_hover_on)
|
|
|
|
|
.observe(button_hover_off)
|
|
|
|
|
.observe(check_set);
|
|
|
|
|
.observe(check_for_sets);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
parent
|
|
|
|
|
.spawn((
|
|
|
|
|
@ -267,23 +271,19 @@ fn setup_play(mut commands: Commands, server: Res<AssetServer>) {
|
|
|
|
|
BackgroundColor(BLACK.with_alpha(0.9).into()),
|
|
|
|
|
Node {
|
|
|
|
|
margin: UiRect::all(Val::Px(5.0)),
|
|
|
|
|
padding: UiRect::all(Val::Px(5.0)),
|
|
|
|
|
padding: UiRect::all(Val::Px(10.0)),
|
|
|
|
|
border: UiRect::all(Val::Px(1.0)),
|
|
|
|
|
height: Val::Px(40.0),
|
|
|
|
|
..default()
|
|
|
|
|
},
|
|
|
|
|
BorderColor(WHITE.into()),
|
|
|
|
|
GlobalZIndex(1),
|
|
|
|
|
))
|
|
|
|
|
.with_children(|parent| {
|
|
|
|
|
parent.spawn(ImageNode {
|
|
|
|
|
image: server.load("kenney_game-icons/PNG/White/1x/question.png"),
|
|
|
|
|
..default()
|
|
|
|
|
});
|
|
|
|
|
parent.spawn(Text("Set!".to_string()));
|
|
|
|
|
})
|
|
|
|
|
.observe(button_hover_on)
|
|
|
|
|
.observe(button_hover_off)
|
|
|
|
|
.observe(check_for_sets);
|
|
|
|
|
.observe(check_set);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
commands
|
|
|
|
|
|