Skip to content

Commit

Permalink
add an example using UI & states to create a game menu (#2960)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mockersf and mockersf committed Jan 13, 2022
1 parent 7fd781e commit ede8154
Show file tree
Hide file tree
Showing 8 changed files with 829 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@

* Generic RPG Pack (CC0 license) by [Bakudas](https://twitter.com/bakudas) and [Gabe Fern](https://twitter.com/_Gabrielfer)
* Environment maps (`.hdr` files) from [HDRIHaven](https://hdrihaven.com) (CC0 license)
* Alien from [Kenney's Space Kit](https://www.kenney.nl/assets/space-kit) (CC0 1.0 Universal)
* Cake from [Kenney's Food Kit](https://www.kenney.nl/assets/food-kit) (CC0 1.0 Universal)
* Ground tile from [Kenney's Tower Defense Kit](https://www.kenney.nl/assets/tower-defense-kit) (CC0 1.0 Universal)
* Game icons from [Kenney's Game Icons](https://www.kenney.nl/assets/game-icons) (CC0 1.0 Universal)
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,10 @@ path = "examples/game/alien_cake_addict.rs"
name = "breakout"
path = "examples/game/breakout.rs"

[[example]]
name = "game_menu"
path = "examples/game/game_menu.rs"

# Input
[[example]]
name = "char_input_events"
Expand Down
5 changes: 0 additions & 5 deletions assets/models/AlienCake/README.md

This file was deleted.

Binary file added assets/textures/Game Icons/exitRight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/textures/Game Icons/right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/textures/Game Icons/wrench.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ Example | File | Description
--- | --- | ---
`alien_cake_addict` | [`game/alien_cake_addict.rs`](./game/alien_cake_addict.rs) | Eat the cakes. Eat them all. An example 3D game
`breakout` | [`game/breakout.rs`](./game/breakout.rs) | An implementation of the classic game "Breakout"
`game_menu` | [`game/game_menu.rs`](./game/game_menu.rs) | A simple game menu

## Input

Expand Down
Loading

0 comments on commit ede8154

Please sign in to comment.