Skip to content

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
  • Default, without accessibility icons: ringracers_moreToggleableHUDElements_ih8dO7sBvA
  • Default, with accessibility icons: ringracers_moreToggleableHUDElements_nlg5FsRie9
  • No Rings HUD element, without accessibility icons: ringracers_moreToggleableHUDElements_g6PqEyuNIb
  • No Rings HUD element, with accessibility icons: ringracers_moreToggleableHUDElements_T0rgiU9htf

2P:

Click to open
  • Default, with accessibility icons: ringracers_moreToggleableHUDElements_OdDCWVpdTx
  • No Rings HUD element, with accessibility icons: ringracers_moreToggleableHUDElements_NQz0j8q1tp

4P:

(The Prison Break and Battle Bumpers/Points HUD elements behave the same way here.)

Click to open
  • Default Race, with accessibility icons: ringracers_moreToggleableHUDElements_18DGCRZOBd
  • No Rings HUD element, with accessibility icons: ringracers_moreToggleableHUDElements_prlZEYzltu
  • Default Prison Break, with accessibility icons: ringracers_moreToggleableHUDElements_7CEZPpRThV
  • Prison Break, with no Rings HUD Element, with accessibility icons: ringracers_moreToggleableHUDElements_vE3znVLANG
  • Prison Break, with no Gametype Info HUD Element, with accessibility icons: ringracers_moreToggleableHUDElements_3QsrtIDdkO
  • Prison Break, with no Gametype Info HUD Element and no Rings HUD Element, with accessibility icons: ringracers_moreToggleableHUDElements_UpBeRbsQAu

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.

Merge request reports

Loading