Richard Parker / EALCD
Revision:
1:f04bcaea1d60
Child:
4:f8f7f4f9c58d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/manager/EATouchManager.h	Thu Mar 04 10:54:06 2010 +0000
@@ -0,0 +1,39 @@
+// Copyright 2010 Richard Parker
+
+#ifndef MBED_EATOUCHMANAGER_H
+#define MBED_EATOUCHMANAGER_H
+
+#include "mbed.h"
+
+class EATouch;
+class EAHitBox;
+
+/**
+ * Class to handle the hits on the touch screen
+ * @author Richard Parker
+ */
+class EATouchManager
+{
+public:
+    EATouchManager(EATouch& touch);
+    
+    ~EATouchManager();
+    
+    void tick();
+    
+    void deleteHitBox(EAHitBox* box);
+    EAHitBox* createHitBox();
+    void clearHitBoxes();
+
+    inline EAHitBox* head() { return _head; }
+    
+private:
+    EATouch& _touch;
+    
+    EAHitBox* _head;
+    
+    void _doHits(short x, short y);
+    
+};
+
+#endif
\ No newline at end of file