Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3e8e6c5

Browse files
committedJan 14, 2022
add an example using UI & states to create a game menu (#2960)
adds an example using UI for something more related to a game than the current UI examples. Example with a game menu: * new game - will display settings for 5 seconds before returning to menu * preferences - can modify the settings, with two sub menus * quit - will quit the game I wanted a more complex UI example before starting the UI rewrite to have ground for comparison Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
1 parent 39db8ec commit 3e8e6c5

File tree

8 files changed

+829
-5
lines changed

8 files changed

+829
-5
lines changed
 

‎CREDITS.md

+4
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@
1616

1717
* Generic RPG Pack (CC0 license) by [Bakudas](https://twitter.com/bakudas) and [Gabe Fern](https://twitter.com/_Gabrielfer)
1818
* Environment maps (`.hdr` files) from [HDRIHaven](https://hdrihaven.com) (CC0 license)
19+
* Alien from [Kenney's Space Kit](https://www.kenney.nl/assets/space-kit) (CC0 1.0 Universal)
20+
* Cake from [Kenney's Food Kit](https://www.kenney.nl/assets/food-kit) (CC0 1.0 Universal)
21+
* Ground tile from [Kenney's Tower Defense Kit](https://www.kenney.nl/assets/tower-defense-kit) (CC0 1.0 Universal)
22+
* Game icons from [Kenney's Game Icons](https://www.kenney.nl/assets/game-icons) (CC0 1.0 Universal)

‎Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,10 @@ path = "examples/game/alien_cake_addict.rs"
359359
name = "breakout"
360360
path = "examples/game/breakout.rs"
361361

362+
[[example]]
363+
name = "game_menu"
364+
path = "examples/game/game_menu.rs"
365+
362366
# Input
363367
[[example]]
364368
name = "char_input_events"

‎assets/models/AlienCake/README.md

-5
This file was deleted.
384 Bytes
Loading

‎assets/textures/Game Icons/right.png

368 Bytes
Loading

‎assets/textures/Game Icons/wrench.png

637 Bytes
Loading

‎examples/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ Example | File | Description
182182
--- | --- | ---
183183
`alien_cake_addict` | [`game/alien_cake_addict.rs`](./game/alien_cake_addict.rs) | Eat the cakes. Eat them all. An example 3D game
184184
`breakout` | [`game/breakout.rs`](./game/breakout.rs) | An implementation of the classic game "Breakout"
185+
`game_menu` | [`game/game_menu.rs`](./game/game_menu.rs) | A simple game menu
185186

186187
## Input
187188

‎examples/game/game_menu.rs

+820
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.