Problem updating scene - simple i think?...

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
ozrinaut
Posts: 28
Joined: Tue Sep 13, 2005 5:09 pm

Problem updating scene - simple i think?...

Post by ozrinaut »

I made a simple class that stores information about a grid and the blocks within.

In my event reciever class [user-input] I do something like this:

Code: Select all

		switch(event.EventType)
		{
		case EET_MOUSE_INPUT_EVENT :
			switch(event.MouseInput.Event)
			{
			case EMIE_RMOUSE_PRESSED_DOWN :
				{
					testint+=1;
                   blocks[0].setVal(1);
				}
				
			}
		}
It increases the value of testint by one, and sets the first block value to 1.
However - when i print these values through draw like this:

Code: Select all

 font3->draw(core::stringw(testint).c_str(), core::rect<s32>(144,24,300,550), video::SColor(255,0,0,0));
//OR
font3->draw(core::stringw(blocks[i].getVal()).c_str(), core::rect<s32>(blocks[i].GetCenterX(),blocks[i].GetCenterY(),300,550), video::SColor(255,0,0,0));
The first font3->draw works fine, it increases and gets updated on the screen when i hit my right mouse button - however the class member is not!
It is a very very simple class - i can post it if anyone thinks that might be the source of the problem.

I appreicate your time,

rob
Post Reply