How can I get a HUD?

Blitz3D Forums/Blitz3D Programming/How can I get a HUD?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Basically, you convert 2D coordinates to 3D coordinates, add the triangles the way you want, etc. and then just modify them to suit changes in your GUI.

The screenshot above would just be adding a quad to a mesh, texturing it with the sortof techy block one, then creating a triangle fan (more like a triangle strip that's in a sortof tubular shape), texturing it with the blueish block one, and that's that. For every change in health you'd just change the vertex colors on the triangle fan like this:

Vs = CountVertices(TFSurface)
HealthMod# = (HP#/100)*Vs
For v = 0 To Vs-1 Step 4
     If v < HealthMod Then
          For i = 0 To 3
               VertexColor TFSurface,255,255,255,1.0
          Next
     Else
          For i = 0 To 3
               VertexColor TFSurface,128,128,128,1.0
          Next
     EndIf
Next