diff options
author | 2019-09-05 09:37:54 +0200 | |
---|---|---|
committer | 2019-09-05 09:37:54 +0200 | |
commit | b81ab91e671c4dc65567e6c68a205eecd7f87f32 (patch) | |
tree | 119973d3f6675b373082070b2e113e3ab35d4ebb /examples/tour/main.rs | |
parent | ced3ffc22570048711fefba638782a31d0e06035 (diff) | |
download | iced-b81ab91e671c4dc65567e6c68a205eecd7f87f32.tar.gz iced-b81ab91e671c4dc65567e6c68a205eecd7f87f32.tar.bz2 iced-b81ab91e671c4dc65567e6c68a205eecd7f87f32.zip |
Complete examples `README`
Diffstat (limited to 'examples/tour/main.rs')
-rw-r--r-- | examples/tour/main.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/tour/main.rs b/examples/tour/main.rs index 0a6a2005..901a976a 100644 --- a/examples/tour/main.rs +++ b/examples/tour/main.rs @@ -16,8 +16,8 @@ pub fn main() -> ggez::GameResult { let (context, event_loop) = { &mut ggez::ContextBuilder::new("iced", "ggez") .window_mode(ggez::conf::WindowMode { - width: 850.0, - height: 850.0, + width: 1280.0, + height: 1024.0, ..ggez::conf::WindowMode::default() }) .build()? @@ -133,14 +133,14 @@ impl event::EventHandler for Game { let screen = graphics::screen_coordinates(context); let (messages, cursor) = { - let layout = self.tour.layout(); + let view = self.tour.view(); let content = Column::new() .width(screen.w as u16) .height(screen.h as u16) .align_items(iced::Align::Center) .justify_content(iced::Justify::Center) - .push(layout); + .push(view); let renderer = &mut Renderer::new( context, @@ -165,7 +165,7 @@ impl event::EventHandler for Game { }; for message in messages { - self.tour.react(message); + self.tour.update(message); } mouse::set_cursor_type(context, into_cursor_type(cursor)); |