Page 2 of 2

Posted: Wed Nov 18, 2009 8:20 am
by Morganolla
Thanks everybody. I wrote my class as you advised:

Code: Select all

class MouseWheelReceiver : public IEventReceiver
{

public:
	MouseWheelReceiver()
	{WhRotor=0;}

	virtual bool OnEvent(const SEvent& event)
	{
		if (event.EventType == irr::EET_MOUSE_INPUT_EVENT)
		{
	       if(event.MouseInput.Event == EMIE_MOUSE_WHEEL) WhRotor+=event.MouseInput.Wheel;
		}
 		return false;
	}

	virtual f32 Wheel()
	{ return WhRotor;}

private:
	f32 WhRotor;
};
But function ...Wheel() every time returns 0! Despite I rotate mouse wheel very hard. What's wrong? Where is mistake?

Posted: Wed Nov 18, 2009 11:37 am
by Morganolla
Well... I found my mistake. Now, Everything is OK! Thanks.