Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Make it easy to cut and paste commands
  • Loading branch information
wtholliday authored Jan 23, 2025
1 parent 7f6b573 commit 11e9f05
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ rui is GPU rendered and updates reactively (when your state changes). The focus

## Examples

obligatory Counter (`cargo run --example counter`):
obligatory Counter:

```
cargo run --example counter
```

```rust
use rui::*;
Expand All @@ -45,7 +49,11 @@ fn main() {

<img src="screenshots/counter.png" alt="counter screenshot" style="width:50%;">

some shapes (`cargo run --example shapes`):
some shapes:

```
cargo run --example shapes
```

```rust
use rui::*;
Expand All @@ -66,7 +74,11 @@ fn main() {

<img src="screenshots/shapes.png" alt="shapes screenshot" style="width:50%;">

canvas for gpu drawing (`cargo run --example canvas`):
canvas for gpu drawing:

```
cargo run --example canvas
```

```rust
use rui::*;
Expand All @@ -92,7 +104,11 @@ fn main() {

<img src="screenshots/canvas.png" alt="canvas screenshot" style="width:50%;">

`slider` with `map` (`cargo run --example slider`):
`slider` with `map`:

```
cargo run --example slider
```

```rust
use rui::*;
Expand Down Expand Up @@ -126,7 +142,11 @@ fn main() {

<img src="screenshots/slider.png" alt="slider screenshot" style="width:50%;">

widget gallery (`cargo run --example gallery`):
widget gallery:

```
cargo run --example gallery
```

<img src="screenshots/gallery.png" alt="widgets gallery screenshot" style="width:50%;">

Expand Down

0 comments on commit 11e9f05

Please sign in to comment.