X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Felement.cpp;fp=src%2Fgui%2Felement.cpp;h=1aa63f72a9314aabd0c7ea0a9dbf6e5cd1cc0a59;hb=f9098d0570ae6462781e8189518085cb1c8c00ef;hp=0000000000000000000000000000000000000000;hpb=836c7fa1f3e2dc3ec9849cac2584d4544bf2fba4;p=virtualjaguar diff --git a/src/gui/element.cpp b/src/gui/element.cpp new file mode 100644 index 0000000..1aa63f7 --- /dev/null +++ b/src/gui/element.cpp @@ -0,0 +1,18 @@ +// +// GUI element base class +// +// by James L. Hammons +// + +#include "element.h" + +// Initialize class variables (Element) + +uint32 * Element::screenBuffer = NULL; +uint32 Element::pitch = 0; + +bool Element::Inside(uint32 x, uint32 y) +{ + return (x >= (uint32)extents.x && x < (uint32)(extents.x + extents.w) + && y >= (uint32)extents.y && y < (uint32)(extents.y + extents.h) ? true : false); +}