X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fcontainer.cpp;h=25079d972e9cb0fb3f6ba925a40a3282baa69af6;hb=11802354d1ddc5bc571d83d8fc9b600618cb4372;hp=47295f40f043576fdcd24b9d37ef803af439918d;hpb=14fee18e7a8ebfccfc1ebe203fe049f268efb40a;p=architektonas diff --git a/src/container.cpp b/src/container.cpp index 47295f4..25079d9 100644 --- a/src/container.cpp +++ b/src/container.cpp @@ -191,6 +191,26 @@ class so that we can leverage that stuff here as well. // every object for collision. /*virtual*/ void Container::PointerMoved(Vector point) { + if (!isTopLevelContainer) + { + // check for selection rectangle too + + + needUpdate = true; + + for(std::vector::iterator i=objects.begin(); i!=objects.end(); i++) + { + if ((*i)->HitTest(point)) + { + state = OSSelected; + return; + } + } + + state = OSInactive; + return; + } + // objectWasDragged = true; //printf("CONTAINER: PointerMoved()\n"); @@ -230,6 +250,13 @@ about keeping track of old states... /*virtual*/ bool Container::NeedsUpdate(void) { + // If this is *not* a top level container, then we treat it as an + // aggregate object. + if (!isTopLevelContainer) + { + return needUpdate; + } + // Search through objects for one that needs an update; if one is found, // return immediately. for(std::vector::iterator i=objects.begin(); i!=objects.end(); i++)