Skip to content

Commit

Permalink
updated readme + added credits
Browse files Browse the repository at this point in the history
  • Loading branch information
jice-nospam committed Jan 13, 2023
1 parent 18508d9 commit 7ad0fe4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# contributors
Edwin Cheng (edwin0cheng <[email protected]>)
jice (jice-nospam <[email protected]>)
Koen Beerta (slavjuan)
Funnisimo (funnisimo)
Ivo Wingelaar (IvoWingelaar)
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This library provides a native/wasm compatibility layer for following components

```toml
[dependencies]
uni-app = "0.2.*"
uni-app = "0.3.*"
```

```rust
Expand All @@ -35,13 +35,10 @@ fn main() {
app.run(move |app: &mut uni_app::App| {
for evt in app.events.borrow().iter() {
// print on stdout (native) or js console (web)
uni_app::App::print(format!("{:?}\n", evt));
// exit on key ou mouse press
match evt {
&uni_app::AppEvent::KeyUp(_) => {
uni_app::App::exit();
}
&uni_app::AppEvent::MouseUp(_) => {
uni_app::App::print(format!("{:?}", evt));
// exit when pressing escape
match &evt {
uni_app::AppEvent::KeyUp(ev) if ev.code == ScanCode::Escape => {
uni_app::App::exit();
}
_ => (),
Expand Down Expand Up @@ -94,6 +91,8 @@ at your option.

### Contribution

You can contribute to this library through pull requests. If you do so, please update the CHANGELOG.md and CREDITS.md files. If you provide a new feature, consider adding an example as a tutorial/showcase.

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
additional terms or conditions.
2 changes: 1 addition & 1 deletion examples/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fn main() {
for evt in app.events.borrow().iter() {
// print on stdout (native) or js console (web)
uni_app::App::print(format!("{:?}", evt));
// exit on key or mouse press
// exit when pressing escape
match &evt {
uni_app::AppEvent::KeyUp(ev) if ev.code == ScanCode::Escape => {
uni_app::App::exit();
Expand Down

0 comments on commit 7ad0fe4

Please sign in to comment.