1
\$\begingroup\$

I am new to direct x and following this tutorial : brayzarsoft (part 14) I was able to display text. However, using this method the text is rendered to a texture.

When you look at games that have chat/consoles, you can select/copy/paste the text. How do they achieve this effect? Is it by using the winapi or do they code the whole system to be able to do this with texture?

\$\endgroup\$
1
\$\begingroup\$

Most games use an entirely separate system to do this, such as Scaleform, though there are some exceptions.

\$\endgroup\$
  • \$\begingroup\$ Yea a friend told me that Ubisoft used this for some of their games, but now that flash is dead I don't think it's a good idea to use it for new games. \$\endgroup\$ – Antoine Apr 15 '15 at 13:53
1
\$\begingroup\$

There are very few resource on the web concerning this, but here is what I have been able to get :

WIN32 : You can use win32 controls, but you won't be able to customize the look/feel and will have very limited features

The big studio way : Custom code everything using Os event. Just thinking of a textbox gives me a headache. Displaying. The textbox's background, after each presse key calculate the width in pixel of the char, place it beside the last one and we are not talking about selection/copy/paste yet...

The small team way Use libraries like CEGUI to do this part of your game.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.