eventReciever

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
trisman
Posts: 9
Joined: Sat Jun 11, 2005 5:59 pm

eventReciever

Post by trisman »

Hi,
i want to check if the left button is pressed , and when its pressed down i want a text to appear. Now this is the small piece of code :

class MyEventReceiver : public IEventReceiver
{
public:
virtual bool OnEvent(SEvent event) {
if (event.MouseInput.Event == EMIE_LMOUSE_PRESSED_DOWN)
blntext = true;
}};

It won't compile, the error is at blntext= true;
and yes i declared the boolean.
Sorry for my noobness , but i'm learning ;)
HelloKitty

Post by HelloKitty »

Code: Select all

class MyEventReceiver : public IEventReceiver 
{ 
public: 
virtual bool OnEvent(SEvent event) 
{ 
if (event.EventType == EET_MOUSE_INPUT_EVENT)
{
if (event.MouseInput.Event == EMIE_LMOUSE_PRESSED_DOWN)
{
text =true;
}
}
return false;
}
};

There you go :) read the tuts and API, its all in there.
Post Reply