View Single Post
aStrike's Avatar
Posts: 80 | Thanked: 225 times | Joined on Sep 2012
#2
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...
__________________
Check My Game, Alpha Strike V1.1.0-2 Now in Extras-devel.
Alpha Strike (v1.0.0-2) gameplay video: HERE!