SDL_SetTextInputRect actually allows text input to rect ? |
SDL_SetTextInputRect actually allows text input to rect ? |
Alex Baines
Guest
|
SDL doesn't have text rendering built in, you'll need to look at SDL_TTF
for that. SDL_SetTextInputRect is a function related to SDL's IME support which sets the location that an IME candidate list will appear. This is only relevant to languages that don't have a 1:1 mapping of key to character. SDL_TTF: https://www.libsdl.org/projects/SDL_ttf/ SDL IME info: https://wiki.libsdl.org/Tutorials/TextInput _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||
|
SDL_SetTextInputRect actually allows text input to rect ? |
Jonny D
|
SDL_ttf renders a string to a surface, which you have to convert to a texture before drawing on the screen.
If you want to do more direct rendering and individual character caching (a little higher level than SDL_ttf), I put up a library recently that is made for it: https://github.com/grimfang4/SDL_FontCache Jonny D On Wed, Apr 22, 2015 at 10:14 PM, Alex Baines wrote:
|
|||||||||||||
|
SDL_SetTextInputRect actually allows text input to rect ? |
Sik
|
2015-04-22 23:14 GMT-03:00, Alex Baines:
This. I *believe* that the idea is that you use it to indicate the area covered by the placeholder text, sadly there isn't any good documentation (not just talking about SDL2, the underlying system APIs are just as unclear about this). _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|