Jump to content
  • Advertisement
Sign in to follow this  
wallytsx

Gui Textbox

This topic is 2593 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello!!, im trying to make a textbox control with SFML library, but i dont understand how to properly render the text, and the relation with de caret position and so on...
I know that i can use glScissor to clip the text area....
I appreciate someone explain how it works!
Thanks

Share this post


Link to post
Share on other sites
Advertisement
For the font, there should be a function to tell you the height of the font (usually there is one that tells you the height of an entire text). It depends on the rendering library you're using for fonts.

To clip an area I personally use glViewport/glOrtho and not glScissor.

Share this post


Link to post
Share on other sites

For the font, there should be a function to tell you the height of the font (usually there is one that tells you the height of an entire text). It depends on the rendering library you're using for fonts.

To clip an area I personally use glViewport/glOrtho and not glScissor.


Im using SFML 1.6.
Suppose i can clip the textbox, then how do i draw correctly the text.
Logicaly the basic managment of the textbox is easy, i cant understand how to properly draw the text.
Thanks

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!