D
Dennis Lenz
Guest
Hi folks!
Something is baffling me here, and i have no idea why it doesn´t work as expected:
I have four objects on the screen. They´re all of the same type. They are created via drag and drop.
Upon creation i store their ID in an global array, like so:
Now, each GUI Object has a key_press event, to move it pixel-per-pixel up/down/left/right.
Upon moving an GUI object e.g. up, i do this (key up event):
...now my problem. It simply doesn´t do anything! I never see a line :-(
Can anybody help me, what am i doing wrong here?
Thanks!!
Something is baffling me here, and i have no idea why it doesn´t work as expected:
I have four objects on the screen. They´re all of the same type. They are created via drag and drop.
Upon creation i store their ID in an global array, like so:
Code:
gNew_GUI_Object++;
gObject_ID[gNew_GUI_Object] = id;
Upon moving an GUI object e.g. up, i do this (key up event):
Code:
y--;
if (gNew_GUI_Object > 1)
{
var c;
for (c=1; c<gNew_GUI_Object; c++)
{
if (gObject_ID[c] != id) // dont check myself
{
if (gObject_ID[c].y == y)
{
// draw a damn line to indicate, that this object is aligned with another one. (same y coords).
}
}
}
}
Can anybody help me, what am i doing wrong here?
Thanks!!
Last edited by a moderator: