Simple beginner question about MastEventReciever

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Zenchuck
Posts: 17
Joined: Sun Aug 26, 2007 2:34 pm
Location: Victoria, BC
Contact:

Simple beginner question about MastEventReciever

Post by Zenchuck »

Hi all,

I'm new to C++ and I'm trying to learn using irrlicht.

I want to get MastEventReciever class working but no luck.

Code: Select all

	while(device->run())
	{
		/*
		Anything can be drawn between a beginScene() and an endScene()
		call. The beginScene clears the screen with a color and also the
		depth buffer if wanted. Then we let the Scene Manager and the
		GUI Environment draw their content. With the endScene() call
		everything is presented on the screen.
		*/
		eventM.endEventProcess();
		driver->beginScene(true, true, SColor(255,255,255,255));
		if (eventM.rightMousePressed())
        {
        cout << "it works!!";
        /*guienv->addButton(rect<int>(55,60,200,80),0,101,L"Crap");
        vector3df v = node->getPosition();
        v.X = v.X+1;
        node->setPosition(v);*/
        }

		smgr->drawAll();
        guienv->drawAll();
		driver->endScene();
		eventM.startEventProcess();
	}
I have the class initialized in the main loop. Why does nothing happen in the game loop when I try my eventM.blahblah... if().
Zenchuck
Posts: 17
Joined: Sun Aug 26, 2007 2:34 pm
Location: Victoria, BC
Contact:

Post by Zenchuck »

Okay, I'm an idiot!

I didn't add the reciever to my irrlichtDevice

:oops:
Post Reply