Skip to content

Commit

Permalink
correctly set up background color in mobile example (#12384)
Browse files Browse the repository at this point in the history
# Objective

- Since #11165, the button in the mobile example doesn't visually react
to touches

## Solution

- Correctly set up the background color
  • Loading branch information
mockersf committed Mar 11, 2024
1 parent 879b170 commit 4073214
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions examples/mobile/src/lib.rs
Expand Up @@ -104,18 +104,22 @@ fn setup_scene(

// Test ui
commands
.spawn(ButtonBundle {
style: Style {
justify_content: JustifyContent::Center,
align_items: AlignItems::Center,
position_type: PositionType::Absolute,
left: Val::Px(50.0),
right: Val::Px(50.0),
bottom: Val::Px(50.0),
.spawn((
ButtonBundle {
style: Style {
justify_content: JustifyContent::Center,
align_items: AlignItems::Center,
position_type: PositionType::Absolute,
left: Val::Px(50.0),
right: Val::Px(50.0),
bottom: Val::Px(50.0),
..default()
},
image: UiImage::default().with_color(Color::NONE),
..default()
},
..default()
})
BackgroundColor(Color::WHITE),
))
.with_children(|b| {
b.spawn(
TextBundle::from_section(
Expand Down

0 comments on commit 4073214

Please sign in to comment.