use bevy::{color::palettes::css::NAVY, prelude::*};
use bevy_ui_text_input::{TextInputNode, TextInputPlugin};
fn main() {
App::new()
.add_plugins((DefaultPlugins, TextInputPlugin))
.add_systems(Startup, setup)
.run();
}
fn setup(mut commands: Commands) {
commands.spawn(Camera2d);
commands
.spawn(Node {
width: Val::Percent(100.),
height: Val::Percent(100.),
justify_content: JustifyContent::Center,
align_items: AlignItems::Center,
flex_direction: FlexDirection::Column,
row_gap: Val::Px(10.),
..Default::default()
})
.with_child((
TextInputNode::default(),
Node {
width: Val::Px(500.),
height: Val::Px(250.),
..default()
},
BackgroundColor(NAVY.into()),
));
}