Hello together,
I am trying to do some stuff with input from keyboard and mouse in ogre, but there is one thing I couldn't find out to do: Getting the clicked mouseButton.
I am using the function bool mousePressed(...) to get mouseEvents and this is working fine. In this function I wrote a message with cout so I know that the function was called when I click the mouse.
Now I want to try to make an event which is just happening when a special button on the mouse was clicked. For example the left button.
For the keyBoardEvents you can go with evt.keySym.sym == SDLK_K for example.
I couldn't find something simelar for mouseinput. Can you tell me if there is something simelar for mouse input and mouse motion, because mouse motion would be also very important for me!
I searched in this forum for answers and also on other pages,, but couldn't find something.
Thank you very much.
Regards,
Daniel
[1.10.8] OgreBites::InputListener::mouseButtonEvent - How to get the clicked mouseButton! Topic is solved
-
- Gnoblar
- Posts: 16
- Joined: Mon Oct 16, 2017 1:47 am
- x 2
-
- OGRE Team Member
- Posts: 1994
- Joined: Sun Mar 30, 2014 2:51 pm
- x 1074
- Contact:
Re: [1.10.8] OgreBites::InputListener::mouseButtonEvent - How to get the clicked mouseButton!
OgreBites::MouseButtonEvent is just a typdef for SDL, hence:
https://wiki.libsdl.org/SDL_MouseButtonEvent
https://wiki.libsdl.org/SDL_MouseButtonEvent
-
- Gnoblar
- Posts: 16
- Joined: Mon Oct 16, 2017 1:47 am
- x 2
Re: [1.10.8] OgreBites::InputListener::mouseButtonEvent - How to get the clicked mouseButton!
Thank you that did the trick!
Regards
Regards