Dynamic HUD mainly coded by DirkTheHusky
Coding Assistance from Jade Space Rabbit
Position number drawing code and I/O saving from Bloops
Original SRB2Kart code and HUD sprites by Kart Krew

-- Introductionary / Reusable info --

So, this mod is another one of those "DIY" scenarios where I try to code myself.
Well, almost as I tried to figure out  what to do to convert source code material into lua.
It kind of worked out except I ran into tons of loopholes on the way.
Nonetheless, this was some experience and I'm overall pleased with the end results.

But let's get down to business.
If you reading this, it means you want to check in the resources of this addon.
Most of the graphics are from the base game, except there startcolored.
They are for operation the color features that dynamic HUD uses.
Except for the sad face icon and the section race banner.
If you want to use those, please credit me.

If you want to use the code for your own HUD modification, go ahead.
But if you came here to steal this code without crediting then we're gonna have some problems.

-- Do it yourself / Code keys --

This mod is marked reusable for the reason of making your own custom HUD.
If you do want to know how stuff works, read this before you know what you're doing.
"player.huddisplay" - Used to check how long the HUD is being draw off screen before the scroll starts.

"player.dissplayscroll" - Used to let the script know how far a HUD element is being drawn. Whenever the race starts or ends.

"player.itemscroll" - Separate values for the item roulette. Functions how displayscroll works except whenever you grab an item it starts to scroll.

"player.laptimer" - Lap timer.
"player.lapsavetime" - Lap time for when you completed a lap/section. Used to know your record time.
"player.lapsaved" - Variable for when you completed a lap. Sets to true whenever the lap count cards play and sets to false when said cards are done.

offset-displayscroll = Draw from the left side of the screen
offset+displayscroll = Draw from the right side of the screen

Be sure to check the actual x positions of the hud element to know where you really want to place the HUD.
You can do the same thing for y positions for your own mod.

-- Features --

List of features Dynamic HUD contains

- Nearly every HUD that can be recoded has been recoded.
- Banners now change colors depending on player's skincolor.
- You can save your options through the dynamics and dh_ commands.
- You can check your lap time whenever you finish a lap.
- Section banner been added for Section races.
- Mini-map icons have been reworked. CPUs are down downscaled and all icons scale depending on grow and shrink.
- Roulette border now change color depending on odds.

-- Commands -- 

dynamics - Turns on Dynamic HUD. Otherwise, goes back to default HUD
dh_positions - Toggles Dynamic Positions
dh_gameinfo - Toggles Dynamic Game info
dh_time - Toggles Dynamic Time
dh_speedometer - Toggles Dynamic Speedometer
dh_minimap - Toggles Dynamic Mini-map
dh_roulette Toggles Dynamic Roulette

-- Adding support --

To add Dynamics to your HUD, check to see if dyn_enabled is on.

That is all! And remember, please give credit whenever you use this for your own mod.

~DirkTheHusky