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.
darko024
Posts: 9 Joined: Tue Mar 14, 2006 2:45 am
Post
by darko024 » Tue Sep 11, 2007 7:42 pm
need help with this :
I have images array
which set like this
Code: Select all
for(int i = 1; i <=8; i++) {
for(int b = 1; b <=8; b++) {
p[i][b] = guienv->addImage(empty,position2d<int>((i*50)-50,(b*50)-50));
}
}
and if I click on one image i want to get something like this p[1][3] is select ...
-------
thx
shogun
Posts: 162 Joined: Wed Sep 05, 2007 11:02 am
Location: inside
Post
by shogun » Tue Sep 11, 2007 8:30 pm
Give your images IDs with setID(). This could be something like i*8+b.
You should then be able to get the ID with event.GUIEvent.Caller->getID() in your receiver method.