vbGore Free Online RPG Engine

Revolutionizing Visual Basic ORPG Development
It is currently Sat May 18, 2013 9:00 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: hardware rendered text box.
PostPosted: Mon Feb 16, 2009 12:27 pm 
Slave to the BB

Joined: Sat Feb 24, 2007 11:17 pm
Posts: 2704
Location: The Aussie Land
Is the TextBox/InputBox in vbgore hardware rendered? If so was it easy/difficult to make?


Top
 Profile  
 
 Post subject: Re: hardware rendered text box.
PostPosted: Mon Feb 16, 2009 12:32 pm 
Site Admin

Joined: Fri Jul 14, 2006 4:00 pm
Posts: 11230
Location: Washington
Yeah. It uses the same rendering as all the graphics.

As for being difficult, not really. I just used an external program to generate a bitmap and a table containing the information of each character (texture coordinates and size). To use it internally, you just:

- Take input string and destination
- Break string into characters
- Foreach character:
- - Look up the character information
- - Draw character at destination
- - destination.X += character.Size.X

Things only really get difficult when trying to do stuff like textboxes with multi-line selecting and such.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 8 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group