Kimimaru Posted June 25, 2010 Author Share Posted June 25, 2010 Hey, everyone! I'm currently converting my game to use DirectX8, and I'm having some difficulty. I'm starting out with changing the way the Client draws out text, also known as Sub DrawText. I have everything set up well, but the only thing stopping me from testing out what I've done is a 'Type Mismatch' error in Sub DrawText. Here's my Sub:```Public Sub DrawText(ByVal x As Long, ByVal y As Long, ByVal Text As String, color As Long) Dim TextRect As RECT TextRect.Top = y TextRect.Bottom = TextRect.Top + 20 TextRect.Left = x TextRect.Right = TextRect.Left + Len(Text) + 10 Direct3DX.DrawText MainFont, D3DColorRGBA(255, 255, 255, 255), Text, TextRect, DT_TOP Or DT_CENTEREnd Sub```It's giving me a type mismatch error on **TextRect** in the Direct3DX.DrawText statement. Any suggestions on why this is happening? Thanks in advance. Link to comment Share on other sites More sharing options...
Robin Posted June 25, 2010 Share Posted June 25, 2010 Don't use DrawText. It's as slow in DX8 as it is in DD7.Create your own texture and use that. Link to comment Share on other sites More sharing options...
Kimimaru Posted June 25, 2010 Author Share Posted June 25, 2010 Okay, thanks, but how would I go about doing that? I know how to initialize textures and stuff like that, but how do I create a texture that serves as text? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now