as i say, i have a problem when i updating a previous project to v1.4.
As in many irrlicht examples arround the web, i maked a class from IEventReciever to manage the input events:
Code: Select all
class MiEventReceiver : public IEventReceiver
{
public:
virtual bool OnEvent(SEvent event)
{
keys[irr::KEY_LBUTTON]=false;
//onEvent
if(event.EventType == irr::EET_KEY_INPUT_EVENT){
keys[event.KeyInput.Key] = event.KeyInput.PressedDown;
}
if (event.EventType == irr::EET_MOUSE_INPUT_EVENT)
{
switch( event.MouseInput.Event )
{
case irr::EMIE_LMOUSE_LEFT_UP:
keys[irr::KEY_LBUTTON]= true;
break;
default:
keys[irr::KEY_LBUTTON]=false;
break;
}
}
return false;
}
};
Code: Select all
class Dispositivo {
public:
Dispositivo(ISceneManager** smgr
, IrrlichtDevice** device
, IVideoDriver** driver);
private:
MiEventReceiver receiver;
};
It seems that its not enough to define the abstract method OnEvent() as i did. But i dont know what i supossed to do.error: cannot declare field `Dispositivo::receiver' to be of type `MiEventReceiver'
error: because the following virtual functions are abstract:
D:\irrlicht-1.4\include\IEventReceiver.h:256: error: virtual bool irr::IEventReceiver::OnEvent(const irr::SEvent&)
:: === Build finished: 3 errors, 4 warnings ===
I hope that anybody can help me.
sorry if this topic was talked anytime, i was looking for but didnt find anything.
Thx in advance
Greetings