Kees Jongenburger wrote:
> I have been asking
> around but did not find a simple pluggable virtual keyboard for sdl.

This is IMHO a very simple problem. Just a quick guess: You have to draw a nice 
keyboard, 
export it to BMP and load it with SDL_LoadBMP(). Then you display (blit) it 
with 
SDL_BlitSurface(). Don't forget to update the screen with SDL_UpdateRects(). 
Then you can 
SDL_WaitEvent() to wait for SDL_MOUSEBUTTONDOWN events. You just need a table 
which contains the x and y coords of our virtual keyboard to decode coords to 
the key 
pressed. Of course you should handle shift, delete and something else. The 
decoded char 
can now be displayed, you probably need some kind of "displaying a 
text"-function (sfont.c) 
for it. And so on. This all can be packed in a function like "char 
*SDL_EnterText()".

An other problem would be to incoperate such a virtual SDL keyboard to the 
large number of 
different SDL-GUI toolkits.

For the most number of action games, you don't need to enter text during  game 
play. Its 
enough if you do this on startup, and therefor you can use a Maemo startup 
window.

-Klaus
-- 
 Klaus Rotter * klaus <at> rotters <dot> de * www.rotters.de

_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers

Reply via email to