i have troubles geting input receiver to work
it works fine in examples but when i cut and paste the derived event receiver class and use in my app it doesnt work,it soesnt react at all,it compiles fine without any wornings?
did you have similiar problems?
i tried everything that i could think of.
please help
input receiver
try this :
it quit the window when tou press escape.
Code: Select all
//Eventreceiver
class MyEventReceiver : public IEventReceiver {
public:
virtual bool OnEvent(SEvent event) {
//Quitte l'application quand on presse echap
if (event.KeyInput.Key == KEY_ESCAPE && event.KeyInput.PressedDown) {
PostQuitMessage(0);
}
return false;
}
};
int main() {
//Instance of the EventReceiver
MyEventReceiver receiver;
//Initialise the engine
IrrlichtDevice *device = createDevice(EDT_DIRECTX9,dimension2d<s32>(ResX,ResY),32,false,false,&receiver);