The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SDL_TextInput behaviour
Thore Sittly
Guest

Hello

I try to modify a predefined text with SDL, but recognized, that the
SDL_KEYDOWN event is only triggered, when I first wrote characters.

So if I have a predefined text of "Hello world" and then start the event
poll, I cannot delete any character. But if I enter some characters, I
can delete as much characters as I typed in. When I added e.g. " new "
to have a text "Hello new world", I can delete only 5 characters ("new
and the two spaces" of this string. No matter where I place my cursror.

Is there a counter which tells me how much characters I typed in, so it
will not underrun the line? Or is the complete edit text stored?
event.edit.text is not writeable and event.text.text only has the newly
typed in characters.

How can I tell SDL that there is text which I handle by myself?

Thank you.

Thore Sittly

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org