]> Shamusworld >> Repos - virtualjaguar/blobdiff - src/gui/element.cpp
Major refactoring of GUI: Phase I
[virtualjaguar] / src / gui / element.cpp
diff --git a/src/gui/element.cpp b/src/gui/element.cpp
new file mode 100644 (file)
index 0000000..1aa63f7
--- /dev/null
@@ -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);
+}