Print Text
by Howard Dortch · in Torque Game Engine · 05/14/2004 (4:28 am) · 4 replies
Hello all. Just got the SDK and got a couple questions.
First how would I print to the display? I would like to print the character position on the landscape someplace on the screen.
Second can I display a 2dsprite overlay without using the HUD functions?
Thanks in advance ....
First how would I print to the display? I would like to print the character position on the landscape someplace on the screen.
Second can I display a 2dsprite overlay without using the HUD functions?
Thanks in advance ....
#2
Font->DrawText() so is there an equivalent in Torque? Just like to print some debug data live on the display while the game runs.
05/16/2004 (8:14 am)
Well since Torque has a "wrapper" for all the directx stuff there is a function in directx called Font->DrawText() so is there an equivalent in Torque? Just like to print some debug data live on the display while the game runs.
#3
example code:
05/16/2004 (8:58 am)
I asked you to look at the function, but I'll cut&paste here instead then. You *could* also look at how the metrics are drawn, too.example code:
int iHealth = 100 - control->getDamageLevel(); dSprintf( mHealth, 4, "%d", iHealth ); dglSetBitmapModulation( mProfile->mFontColor ); renderJustifiedText(offset, mBounds.extent, mHealth);
#4
05/16/2004 (7:37 pm)
Well that looks like it should print something I'll look into offset and mBounds to figure what values I need there and figure how many modulation variables there are to work with. Thanks....:)
Torque Owner Stefan Lundmark
I used Xaviers resource for creating a Health Display to learn how to use the function you describe.
Edit: And for your second question, I'm not sure what you mean so I'll let someone else answer that.