diff options
author | 2020-03-31 17:49:56 +0200 | |
---|---|---|
committer | 2020-03-31 17:49:56 +0200 | |
commit | e79e832092385346beec47f63e40f24800c535f8 (patch) | |
tree | c29df36b1987de66a58cfb981c5958d25712d51e /examples/solar_system/src | |
parent | 327347501c78a1c8e55a39fe1b5d54d7c2fcbcab (diff) | |
parent | f0ebcc24742aba79cc779a4145a188f2534a5e35 (diff) | |
download | iced-e79e832092385346beec47f63e40f24800c535f8.tar.gz iced-e79e832092385346beec47f63e40f24800c535f8.tar.bz2 iced-e79e832092385346beec47f63e40f24800c535f8.zip |
Merge pull request #246 from hecrj/feature/application-flags
Application flags
Diffstat (limited to 'examples/solar_system/src')
-rw-r--r-- | examples/solar_system/src/main.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/solar_system/src/main.rs b/examples/solar_system/src/main.rs index 4c239806..1967b7c5 100644 --- a/examples/solar_system/src/main.rs +++ b/examples/solar_system/src/main.rs @@ -7,8 +7,8 @@ //! //! [1]: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Basic_animations#An_animated_solar_system use iced::{ - canvas, executor, Application, Canvas, Color, Command, Container, Element, - Length, Point, Settings, Size, Subscription, Vector, + canvas, executor, window, Application, Canvas, Color, Command, Container, + Element, Length, Point, Settings, Size, Subscription, Vector, }; use std::time::Instant; @@ -33,8 +33,9 @@ enum Message { impl Application for SolarSystem { type Executor = executor::Default; type Message = Message; + type Flags = (); - fn new() -> (Self, Command<Message>) { + fn new(_flags: ()) -> (Self, Command<Message>) { ( SolarSystem { state: State::new(), @@ -95,7 +96,7 @@ impl State { pub fn new() -> State { let now = Instant::now(); - let (width, height) = Settings::default().window.size; + let (width, height) = window::Settings::default().size; State { start: now, |