Allow Rings/Blue Sphere HUD to be toggleable through Lua
Summary
This MR adds "rings"
as a toggleable HUD option for Lua hud
functions. When toggled off, the Rings HUD element in Race, and the Blue Spheres HUD element in Battle, Capsules and Versus become hidden. Elements that would be above this one get pushed down to occupy this space, respecting Ring Racers' adaptive HUD design.
Preview
(note that it seems that accessibility icons don't have full splitscreen support)
1P:
Click to open
2P:
4P:
(The Prison Break and Battle Bumpers/Points HUD elements behave the same way here.)
Click to open
- Default Race, with accessibility icons:
- No Rings HUD element, with accessibility icons:
- Default Prison Break, with accessibility icons:
- Prison Break, with no Rings HUD Element, with accessibility icons:
- Prison Break, with no Gametype Info HUD Element, with accessibility icons:
- Prison Break, with no Gametype Info HUD Element and no Rings HUD Element, with accessibility icons:
Testing
Testing environment: ringracers_toggleableRingsHUD.exe -console -skipintro -warp RR_TESTRUN +addfile togglerings.lua
I used the following script for testing: togglerings.lua
It adds the following cvars: enableringshud
and enablegametypehud
, that allow toggling on and off the Rings HUD element and Gametype Info HUD element (this latter one isn't new, but it's used for 4P HUD testing and seeing the positions of the placements when the Rings HUD element is removed in Battle/Prison Break.)
I recommend making toggle binds and play with it, like so:
bind e "toggle enableringshud 1 0"
bind r "toggle enablegametypehud 1 0"
And then press e
and r
to toggle the HUD elements on and off and see if they behave as they should.
I used splitplayers 1
, splitplayers 2
and splitplayers 4
to test 1P, 2P and 4P HUD layouts.
Changelog
- Lua: Added
"rings"
as a toggleable HUD option for the Rings and Blue Spheres HUD element.