added text wrapping

This commit is contained in:
yuni 2024-03-19 15:51:08 +01:00
parent cd02873f5b
commit cc8734e793

View file

@ -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((
NodeBundle {
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, bundle_chatbox,
ChatText, ChatText,
)); ));
});
} }
fn update( fn update(