maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   SDL/C++ Help Need (https://talk.maemo.org/showthread.php?t=86757)

humble 2012-09-10 11:51

SDL/C++ Help Need
 
1 Attachment(s)
I want the mouse event to trigger the keyboard events.

aStrike 2012-09-10 20:32

Re: SDL/C++ Help Need
 
humble: I have not fully understood what you wish here. Could you explain?
From reading the code and my understnding, I neither think that getting a keyboard key press (line 202: "SDLKey key = event.key.keysym.sym;") in an event of type mouse down (line 199: "event.type == SDL_MOUSEBUTTONDOWN") will work nor meant to be used that way.

If you want to execute a block of code that is in the keyboard event you can declare a new function, put the code in it and make both the keyboard event and the mouse event call that function. This way you are not triggering a keyboard event but triggering the code inside the keyboard event.

Hope I could help a little... :)


All times are GMT. The time now is 04:04.

vBulletin® Version 3.8.8