Move status text functionality from html overlay to HUD

@BrettASwift 
This creates a new function every time this code is is executed. This is also a garbage collection issue. It would be better to define this function in the global scope and just reference it.