|
|
@ -174,7 +174,10 @@ pub fn main() {
|
|
|
|
let mut canvas_frame = CanvasFrame::new(window_size);
|
|
|
|
let mut canvas_frame = CanvasFrame::new(window_size);
|
|
|
|
let mut compu_frame = CompuFrame::new(window_size);
|
|
|
|
let mut compu_frame = CompuFrame::new(window_size);
|
|
|
|
|
|
|
|
|
|
|
|
let mut container = Box::new(Slider::new((0.1, 0.1), (0.9, 0.9), 5000));
|
|
|
|
let mut big_container = vec![
|
|
|
|
|
|
|
|
Box::new(Slider::new((0.1, 0.1), (0.9, 0.9), 5000)),
|
|
|
|
|
|
|
|
Box::new(Sprite::new((0.0, -0.5), (0.5, 0.5), 1, sfml_handle.clone())),
|
|
|
|
|
|
|
|
];
|
|
|
|
//container.push(Sprite::new((0.1)));
|
|
|
|
//container.push(Sprite::new((0.1)));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -182,7 +185,13 @@ pub fn main() {
|
|
|
|
events_loop.run(move |event, _, control_flow| {
|
|
|
|
events_loop.run(move |event, _, control_flow| {
|
|
|
|
*control_flow = ControlFlow::Poll;
|
|
|
|
*control_flow = ControlFlow::Poll;
|
|
|
|
|
|
|
|
|
|
|
|
funky_sprite.notify(&event);
|
|
|
|
for eventable in &mut big_container {
|
|
|
|
|
|
|
|
eventable.notify(&event);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for drawable in &mut big_container {
|
|
|
|
|
|
|
|
canvas_frame.draw(&drawable);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
match event {
|
|
|
|
match event {
|
|
|
|
Event::NewEvents(cause) => {
|
|
|
|
Event::NewEvents(cause) => {
|
|
|
@ -244,6 +253,7 @@ pub fn main() {
|
|
|
|
|
|
|
|
|
|
|
|
canvas_frame = CanvasFrame::new(window_size);
|
|
|
|
canvas_frame = CanvasFrame::new(window_size);
|
|
|
|
canvas_frame.draw(&funky_sprite);
|
|
|
|
canvas_frame.draw(&funky_sprite);
|
|
|
|
|
|
|
|
//canvas_frame.draw(&container);
|
|
|
|
// canvas_frame.draw(&compu_sprite1);
|
|
|
|
// canvas_frame.draw(&compu_sprite1);
|
|
|
|
canvas_frame.draw(&slider);
|
|
|
|
canvas_frame.draw(&slider);
|
|
|
|
|
|
|
|
|
|
|
|