Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Text Labels In 3d Space Functions,

Author
Message
_ RealUnReal _
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Dudley, UK
Posted: 23rd Mar 2006 03:46 Edited at: 23rd Mar 2006 05:30
While browsing the forums i noticed a dbpro user asking how to put labels in 3d space, all though not complete this is what i have so far.

edit; Now able to delete labels with delete_label(label ID)
edit; Functions below return label position
edit; label_x(label ID), label_y(label ID), label_z(label ID)



process_labels() - This function must be called in your game loop.

* * * * * new_label * * * * *
label ID = new_label(caption, x, y, z, color)
caption: string
x, y, z: float
color: dword

label ID: integer

This function will create a new label in 3d space at coords x, y, z and return the label ID for it.

* * * * * change_label_caption * * * * *
change_label_caption(label ID, Caption)
label ID: integer
caption: string

This function will change the text of an already existing label.

* * * * * change_label_color * * * * *
change_label_color(label ID, color)
label ID: integer
color: DWORD

This function will change the colour of an already existing label.

* * * * * change_label_position * * * * *
change_label_position(label ID, x, y, z)
label ID: integer
x, y, z: Float

This function will change the position of the label in 3d space.

* * * * * delete_label * * * * *
delete_label(label ID)
label ID: integer

This function will delete an already existing label.

Login to post a reply

Server time is: 2024-11-23 07:11:35
Your offset time is: 2024-11-23 07:11:35