diff options
Diffstat (limited to '')
-rw-r--r-- | examples/tour/Cargo.toml | 13 | ||||
-rw-r--r-- | examples/tour/images/ferris.png (renamed from examples/resources/ferris.png) | bin | 33061 -> 33061 bytes | |||
-rw-r--r-- | examples/tour/src/main.rs (renamed from examples/tour.rs) | 4 |
3 files changed, 15 insertions, 2 deletions
diff --git a/examples/tour/Cargo.toml b/examples/tour/Cargo.toml new file mode 100644 index 00000000..10c3f1da --- /dev/null +++ b/examples/tour/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "tour" +version = "0.1.0" +authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"] +edition = "2018" +publish = false + +[dependencies] +iced = { path = "../.." } +env_logger = "0.7" + +[target.'cfg(target_arch = "wasm32")'.dependencies] +wasm-bindgen = "0.2.51" diff --git a/examples/resources/ferris.png b/examples/tour/images/ferris.png Binary files differindex ebce1a14..ebce1a14 100644 --- a/examples/resources/ferris.png +++ b/examples/tour/images/ferris.png diff --git a/examples/tour.rs b/examples/tour/src/main.rs index b0ee4d96..43c7e50f 100644 --- a/examples/tour.rs +++ b/examples/tour/src/main.rs @@ -681,10 +681,10 @@ fn ferris<'a>(width: u16) -> Container<'a, StepMessage> { // This should go away once we unify resource loading on native // platforms if cfg!(target_arch = "wasm32") { - Image::new("resources/ferris.png") + Image::new("images/ferris.png") } else { Image::new(format!( - "{}/examples/resources/ferris.png", + "{}/images/ferris.png", env!("CARGO_MANIFEST_DIR") )) } |