added text wrapping
This commit is contained in:
parent
cd02873f5b
commit
cc8734e793
25
src/hud.rs
25
src/hud.rs
|
@ -237,16 +237,31 @@ fn setup(
|
||||||
),
|
),
|
||||||
]).with_style(Style {
|
]).with_style(Style {
|
||||||
position_type: PositionType::Absolute,
|
position_type: PositionType::Absolute,
|
||||||
bottom: Val::VMin(2.0),
|
bottom: Val::VMin(0.0),
|
||||||
left: Val::VMin(4.0),
|
left: Val::VMin(0.0),
|
||||||
//bottom: Val::VMin(40.0),
|
//bottom: Val::VMin(40.0),
|
||||||
//left: Val::VMin(30.0),
|
//left: Val::VMin(30.0),
|
||||||
..default()
|
..default()
|
||||||
}).with_text_justify(JustifyText::Left);
|
}).with_text_justify(JustifyText::Left);
|
||||||
commands.spawn((
|
commands.spawn((
|
||||||
bundle_chatbox,
|
NodeBundle {
|
||||||
ChatText,
|
border_color: { BorderColor(Color::RED) },
|
||||||
));
|
style: Style {
|
||||||
|
width: Val::Percent(50.),
|
||||||
|
align_items: AlignItems::Start,
|
||||||
|
position_type: PositionType::Absolute,
|
||||||
|
bottom: Val::VMin(10.0),
|
||||||
|
left: Val::VMin(25.0),
|
||||||
|
..default()
|
||||||
|
},
|
||||||
|
..default()
|
||||||
|
},
|
||||||
|
)).with_children(|parent| {
|
||||||
|
parent.spawn((
|
||||||
|
bundle_chatbox,
|
||||||
|
ChatText,
|
||||||
|
));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update(
|
fn update(
|
||||||
|
|
Loading…
Reference in a new issue