It is currently Fri Nov 24, 2017 6:51 pm

All times are UTC - 5 hours




 Page 1 of 1 [ 3 posts ] 
Author Message
 Post subject: Shader VMK 80 - Gui Label and Text Classes
PostPosted: Sat Apr 11, 2015 6:41 am 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1105
Location: Ontario Canada
We have seen how to load images and use them in the GUI so the next step is to get text working in the Shader Engine. For this we will need a bunch of new classes. The first 2 new classes are the GuiText and GuiLabel classes which I create in this video.


Offline
 Profile  
 
 Post subject: Re: Shader VMK 80 - Gui Label and Text Classes
PostPosted: Sat Apr 11, 2015 6:49 am 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1105
Location: Ontario Canada
While editing the video I noticed a bug in the GuiLabel class. Everytime generateVertices() is called we need to call updateContainerSizes(). In setText we do this properly, but in the constructor updateContainerSizes() was not called. To fix this, lets move the updateContainerSizes() call inside generateVertices() right at the very bottom. That way we will never forget to call updateContainerSizes() when generateVertices() is called. Making this change means we can remove updateContainerSizes from the the GuiLabel::setText function.


Offline
 Profile  
 
 Post subject: Re: Shader VMK 80 - Gui Label and Text Classes
PostPosted: Sat Apr 11, 2015 11:14 pm 

Joined: Sat Aug 16, 2008 7:58 am
Posts: 450
Everything appears to be ready for the FontManager


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 0 guests


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

Jump to:  

cron