X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fcontainer.cpp;h=2eca9f4573473c0c772a4efd96060836e6bc15ec;hb=8a5bf49d09b5a00ebea3ffc449519ad05b0326cc;hp=9cda1fa38b95e6c10d1af0659326a69af61c5501;hpb=31dd33b097661175a86b6799df525972055099fb;p=architektonas diff --git a/src/container.cpp b/src/container.cpp index 9cda1fa..2eca9f4 100644 --- a/src/container.cpp +++ b/src/container.cpp @@ -201,9 +201,10 @@ class so that we can leverage that stuff here as well. // 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::iterator i; + lastObjectHovered = NULL; if (!isTopLevelContainer) { @@ -215,7 +216,7 @@ class so that we can leverage that stuff here as well. else state = OSInactive; - return; + return false; } // No need to do any checking if we're already selected... @@ -253,17 +254,19 @@ class so that we can leverage that stuff here as well. needUpdate = true; } - return; + return false; } for(std::vector::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); }