// into parts and keep subdividing until an acceptable number of objects lie within
// the slice. This way, the GUI will still be responsive and *not* have to test
// every object for collision.
-/*virtual*/ void Container::PointerMoved(Vector point)
+/*virtual*/ bool Container::PointerMoved(Vector point)
{
std::vector<Object *>::iterator i;
+ lastObjectHovered = NULL;
if (!isTopLevelContainer)
{
else
state = OSInactive;
- return;
+ return false;
}
// No need to do any checking if we're already selected...
needUpdate = true;
}
- return;
+ return false;
}
for(std::vector<Object *>::iterator i=objects.begin(); i!=objects.end(); i++)
{
// if (objects[i]->GetState() == OSSelected)
- (*i)->PointerMoved(point);
+ if ((*i)->PointerMoved(point))
+ lastObjectHovered = *i;
}
// Generic container doesn't need this???
// needUpdate = false;
+ return (lastObjectHovered == NULL ? false : true);
}