0

I want to get the status for the mouse wheel or get triggered, when the user uses the mouse wheel.

I already have an event receiver like in the example(which is extending from IEventReceiver) but I cannot see / find a way for the mouse wheel.

Is there another receiver / event handler / solution?

Niklas
  • 23,674
  • 33
  • 131
  • 170

2 Answers2

2
class MyEventReceiver : public IEventReceiver {
    public:
        virtual bool OnEvent(const SEvent& event) {
            if(event.EventType == irr::EET_MOUSE_INPUT_EVENT && event.MouseInput.Event == EMIE_MOUSE_WHEEL)
                printf("%f\n", event.MouseInput.Wheel);

            return false;
        }
...
Niklas
  • 23,674
  • 33
  • 131
  • 170
1

Check the Wheel public attribute of the SMouseInput event type

http://irrlicht.sourceforge.net/docu/structirr_1_1_s_event_1_1_s_mouse_input.html

Nicolas Louis Guillemot
  • 1,570
  • 1
  • 10
  • 23