|
|
|
@ -141,17 +141,11 @@ fn init_ui_list(events: Query<(Entity, &Name), Added<GameUiList>>, mut commands:
|
|
|
|
.entity(entity)
|
|
|
|
.entity(entity)
|
|
|
|
.insert(NodeBundle {
|
|
|
|
.insert(NodeBundle {
|
|
|
|
style: Style {
|
|
|
|
style: Style {
|
|
|
|
// align_content: AlignContent::FlexStart,
|
|
|
|
|
|
|
|
align_items: AlignItems::Stretch,
|
|
|
|
|
|
|
|
border: UiRect::all(Val::Px(2.0)),
|
|
|
|
|
|
|
|
flex_direction: FlexDirection::Column,
|
|
|
|
flex_direction: FlexDirection::Column,
|
|
|
|
justify_items: JustifyItems::Center,
|
|
|
|
justify_items: JustifyItems::Center,
|
|
|
|
|
|
|
|
border: UiRect::all(Val::Px(2.0)),
|
|
|
|
margin: UiRect::all(Val::Px(2.0)),
|
|
|
|
margin: UiRect::all(Val::Px(2.0)),
|
|
|
|
padding: UiRect::all(Val::Px(2.0)),
|
|
|
|
padding: UiRect::all(Val::Px(2.0)),
|
|
|
|
// overflow: Overflow {
|
|
|
|
|
|
|
|
// x: OverflowAxis::Clip,
|
|
|
|
|
|
|
|
// y: OverflowAxis::Clip,
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
..default()
|
|
|
|
..default()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
background_color: BackgroundColor(Color::RED),
|
|
|
|
background_color: BackgroundColor(Color::RED),
|
|
|
|
@ -181,17 +175,11 @@ fn init_ui_set(events: Query<(Entity, &Name), Added<GameUiSet>>, mut commands: C
|
|
|
|
.entity(entity)
|
|
|
|
.entity(entity)
|
|
|
|
.insert(NodeBundle {
|
|
|
|
.insert(NodeBundle {
|
|
|
|
style: Style {
|
|
|
|
style: Style {
|
|
|
|
// align_content: AlignContent::FlexStart,
|
|
|
|
|
|
|
|
align_items: AlignItems::FlexStart,
|
|
|
|
|
|
|
|
border: UiRect::all(Val::Px(2.0)),
|
|
|
|
|
|
|
|
flex_direction: FlexDirection::Row,
|
|
|
|
flex_direction: FlexDirection::Row,
|
|
|
|
flex_wrap: FlexWrap::Wrap,
|
|
|
|
flex_wrap: FlexWrap::Wrap,
|
|
|
|
|
|
|
|
border: UiRect::all(Val::Px(2.0)),
|
|
|
|
margin: UiRect::all(Val::Px(2.0)),
|
|
|
|
margin: UiRect::all(Val::Px(2.0)),
|
|
|
|
padding: UiRect::all(Val::Px(2.0)),
|
|
|
|
padding: UiRect::all(Val::Px(2.0)),
|
|
|
|
// overflow: Overflow {
|
|
|
|
|
|
|
|
// x: OverflowAxis::Clip,
|
|
|
|
|
|
|
|
// y: OverflowAxis::Clip,
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
..default()
|
|
|
|
..default()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
background_color: BackgroundColor(Color::BLUE),
|
|
|
|
background_color: BackgroundColor(Color::BLUE),
|
|
|
|
@ -225,7 +213,6 @@ fn init_ui_button(events: Query<(Entity, &Name), Added<GameUiButton>>, mut comma
|
|
|
|
margin: UiRect::all(Val::Px(2.0)),
|
|
|
|
margin: UiRect::all(Val::Px(2.0)),
|
|
|
|
padding: UiRect::all(Val::Px(2.0)),
|
|
|
|
padding: UiRect::all(Val::Px(2.0)),
|
|
|
|
border: UiRect::all(Val::Px(2.0)),
|
|
|
|
border: UiRect::all(Val::Px(2.0)),
|
|
|
|
justify_content: JustifyContent::Center,
|
|
|
|
|
|
|
|
..default()
|
|
|
|
..default()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
background_color: BackgroundColor(Color::GREEN),
|
|
|
|
background_color: BackgroundColor(Color::GREEN),
|
|
|
|
|