The Red Dead Redemption 2 wheel HUD is a great way to replace typical mouse and keyboard graphical user interactions. Since Raylib makes using a gamepad extremely easy and I typically make button-heavy GUIs, the goal here is to create a user-friendly template to add the selector wheel to a Raylib project.
Still a lot of work to do, but here is a quick recording for those who do not have a gamepad available. (.gif set to not loop, so refresh page to watch again)
There are great tutorials for getting setup with Raylib and emscripten
Then, download raygui.h
and move it to C:\raylib\raylib\src
.
If using VS Code, add "C:/raylib/raylib/src/**"
to the C include paths as seen in the .vscode
directory.
The .py
in the root of this repository builds the main.c
file in the specified directory and outputs an .html
with WASM assets. So far, I have been using it like this:
python .\buildWASM.py -i .\src\ -o .\src\ -c 123456 -n "RDR2 Wheel"
I like to use VS Code with the Live Server extension from Ritwick Dey to develop the WASM .html
. For quicker tests, using the Raylib notepad++ F6 command as shown in the tutorial is great.