restore after broken git
This commit is contained in:
commit
138c62ac34
51 changed files with 7559 additions and 0 deletions
35
src/ui/spawners/slider.rs
Normal file
35
src/ui/spawners/slider.rs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
use bevy::prelude::*;
|
||||
|
||||
pub fn spawn_slider(
|
||||
commands: &mut Commands,
|
||||
root: Entity,
|
||||
){
|
||||
let slider = commands
|
||||
.spawn((
|
||||
Node {
|
||||
display: Display::Flex,
|
||||
width: Val::Percent(30.0),
|
||||
height: Val::Percent(3.0),
|
||||
border: UiRect{
|
||||
left: Val::Px(2.0),
|
||||
right: Val::Px(2.0),
|
||||
top: Val::Px(2.0),
|
||||
bottom: Val::Px(2.0),
|
||||
},
|
||||
..default()
|
||||
},
|
||||
BackgroundColor(Color::srgb_u8(216, 223, 233)),
|
||||
)).id();
|
||||
|
||||
let thumb = commands.spawn((
|
||||
Node{
|
||||
height: Val::Percent(100.0),
|
||||
aspect_ratio: Some(1.0),
|
||||
..default()
|
||||
},
|
||||
BackgroundColor(Color::srgb_u8(1, 226, 106)),
|
||||
)).id();
|
||||
|
||||
commands.entity(slider).add_child(thumb);
|
||||
commands.entity(root).add_child(slider);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue