IIRC SDL_BUTTON(0) should be left, SDL_BUTTON(1) should be middle, and SDL_BUTTON(2) should be right. I forget what SDL_BUTTON_LEFT etc. actually are used for (I think mouse events, not state).
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
Ginto8 wrote:IIRC SDL_BUTTON(0) should be left, SDL_BUTTON(1) should be middle, and SDL_BUTTON(2) should be right. I forget what SDL_BUTTON_LEFT etc. actually are used for (I think mouse events, not state).
Ginto8 wrote:IIRC SDL_BUTTON(0) should be left, SDL_BUTTON(1) should be middle, and SDL_BUTTON(2) should be right. I forget what SDL_BUTTON_LEFT etc. actually are used for (I think mouse events, not state).
I think they're enumerations right?
They're enumerations for mouse event types, not mouse states. Use SDL_BUTTON(n) for the n+1'th button (going left, middle, right and so on) SDL_BUTTON_* is for when you are getting a mouse event from SDL_PollEvent()
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
if (ms && SDL_BUTTON(0) && (state == 'T'))
Â
Did not help. I think SDL_BUTTON(0) is causing it, because when I change it to 1, the warning disappears...
:/
ok sorry I google'd around and it turns out that it IS SDL_BUTTON(n) for the n'th button.
Also, in case anyone's curious, this is the actual SDL_BUTTON macro:
if (ms && SDL_BUTTON(0) && (state == 'T'))
Â
Did not help. I think SDL_BUTTON(0) is causing it, because when I change it to 1, the warning disappears...
:/
ok sorry I google'd around and it turns out that it IS SDL_BUTTON(n) for the n'th button.
Also, in case anyone's curious, this is the actual SDL_BUTTON macro:
So then its 1 for LMB and 2 for MMB and 3 for RMB right? I changed accordingly and its acting up again, middle click triggers left click and middle click
if (ms && SDL_BUTTON(0) && (state == 'T'))
Â
Did not help. I think SDL_BUTTON(0) is causing it, because when I change it to 1, the warning disappears...
:/
ok sorry I google'd around and it turns out that it IS SDL_BUTTON(n) for the n'th button.
Also, in case anyone's curious, this is the actual SDL_BUTTON macro:
So then its 1 for LMB and 2 for MMB and 3 for RMB right? I changed accordingly and its acting up again, middle click triggers left click and middle click
hmm idk that might be something with your mouse config, but according to the code I've seen it's 1 for left, 2 for middle, and 3 for right.
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.