Reply
Thread Tools
humble's Avatar
Posts: 355 | Thanked: 395 times | Joined on Dec 2009 @ USA
#1
I want the mouse event to trigger the keyboard events.
Attached Files
File Type: zip SDLC.zip (17.8 KB, 52 views)
__________________
Would you like to Donate?

My"Current Project(s)":
[Resurrecting] DON

Last edited by humble; 2012-09-10 at 12:02.
 
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!
 
Reply


 
Forum Jump


All times are GMT. The time now is 23:59.