Public Class cGUIManager #Region " Declare " ' TV3D Private _TVScreen2D As MTV3D65.TVScreen2DImmediate Private _TVScreen2DText As MTV3D65.TVScreen2DText Private _HealthBar As Integer #End Region #Region " Init " Public Sub Init() ' Init _TVScreen2D = New MTV3D65.TVScreen2DImmediate _TVScreen2DText = New MTV3D65.TVScreen2DText _HealthBar = clsTexture.Add(cTextureManager.Enum_TextureMode.Mode_Normal, sPathGUI & "\health.bmp", "Healthbar", -1, -1, 0, MTV3D65.CONST_TV_COLORKEY.TV_COLORKEY_BLACK, True) End Sub #End Region #Region " Update " Public Sub Update() '// Draw default GUI _TVScreen2D.Action_Begin2D() _TVScreen2DText.Action_BeginText() _TVScreen2DText.NormalFont_DrawText(clsCamera.GetPositionX, 20, 200, clsGlobal.GetColor(1, 0, 0, 1)) _TVScreen2DText.NormalFont_DrawText(clsCamera.GetPositionZ, 20, 215, clsGlobal.GetColor(1, 0, 0, 1)) _TVScreen2D.Draw_Texture(_HealthBar, 0, 0, 100, 100) _TVScreen2DText.Action_EndText() _TVScreen2D.Action_End2D() End Sub #End Region #Region " Draw Text " Public Sub DrawText(ByVal sText As String) '// Draw custom strings on screen _TVScreen2DText.Action_BeginText() _TVScreen2DText.NormalFont_DrawText(sText, 100, 200, clsGlobal.GetColor(1, 1, 1, 1)) _TVScreen2DText.Action_EndText() End Sub #End Region #Region " Draw Texture " Public Sub DrawTexture(ByVal sTexture As String, ByVal fX1 As Single, ByVal fY1 As Single, ByVal fX2 As Single, ByVal fY2 As Single) _TVScreen2D.Action_Begin2D() _TVScreen2D.Draw_Texture(clsGlobal.GetTex(sTexture), fX1, fY1, fX2, fY2) _TVScreen2D.Action_End2D() End Sub #End Region #Region " Quit " Public Sub Quit() _TVScreen2D = Nothing _TVScreen2DText = Nothing End Sub #End Region End Class