Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
DrawText
Topic Started: Jun 27 2006, 09:35 AM (448 Views)
57E
Member Avatar
Forum Leader
[ *  *  *  *  * ]
Sorry if this is answered before but i can't found any solution to it.
I just can't make text appear in u3d view. Here is code what i use:
Event Create:
Quote:
 
//SetFont(font, number, size, attribute, r, g, b, a)
SetFont('Arial',0, 16, 1, 255, 255, 255, 255);

Event Draw:
Quote:
 
//DrawText(font, x, y, text)
DrawText(0,16 ,16,'FPS'+string(round(fps)));


Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
57E
Jun 27 2006, 08:35 AM
Sorry if this is answered before but i can't found any solution to it.
I just can't make text appear in u3d view. Here is code what i use:
Event Create:
Quote:
 
//SetFont(font, number, size, attribute, r, g, b, a)
SetFont('Arial',0, 16, 1, 255, 255, 255, 255);

Event Draw:
Quote:
 
//DrawText(font, x, y, text)
DrawText(0,16 ,16,'FPS'+string(round(fps)));

Try this:
Code:
 
Create Event:
SetFont(0,'Arial',16,1,255,255,255);


And make sure that the object that draws the text is set to visible. Else the text won't be visible, lol :P
Offline Profile Quote Post Goto Top
 
57E
Member Avatar
Forum Leader
[ *  *  *  *  * ]
It didn't help. Thanks anyway.

Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
Forum God
[ *  *  *  *  *  * ]
57E
Jun 27 2006, 03:46 PM
It didn't help. Thanks anyway.

That's weird. There's maybe something wrong with the depth of the DrawText object?
Offline Profile Quote Post Goto Top
 
Zip
Member Avatar
Forum Leader
[ *  *  *  *  * ]
Do this:
Code:
 

//Create Event:
set_font=1

//Draw Event:
if set_font=1
{
SetFont(0,'Arial',16,1,255,255,255);
set_font=0
}
//this sets the font only one time
DrawText(0,16 ,16,'FPS'+string(round(fps)));


I have inserted the SetFont() in the draw event, but executed only one time.
Sorry if i've made some errors, I'm not english!
Offline Profile Quote Post Goto Top
 
57E
Member Avatar
Forum Leader
[ *  *  *  *  * ]
Thanks Zip it works. ^_^

Offline Profile Quote Post Goto Top
 
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply