From c5af4c3057a904f2a037a624273c1c7a4b0295a5 Mon Sep 17 00:00:00 2001 From: jonas Date: Fri, 28 Dec 2018 13:04:01 +0100 Subject: Adding Click and Char event handling and focusing to cObjectHandler cObject: is now able to be parent class cObjectHandler: Implemented --- cObjectHandler.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'cObjectHandler.h') diff --git a/cObjectHandler.h b/cObjectHandler.h index 1749c9b..ee83877 100644 --- a/cObjectHandler.h +++ b/cObjectHandler.h @@ -31,7 +31,25 @@ public: int write(); //writes all objects in objects[] to render buffer + int clickEvent(sPos _pos, unsigned int _button); + //Calls onClick of cObject at _pos, focuses Object + //returns 0 if successfull, 1 if Object is empty + + int charEvent(unsigned char _c); + //Calls onChar of active cObject, default 0 + //returns 0 if successfull, 1 if focused Object is empty + + void focusNext(); + //Focuses next Object + + void focus(unsigned int _id); + //Focuses specific Object + private: + void buildHitmap(); + vector objects; + vector> iHitMap; cRender *render; + unsigned long int iActiveObject; }; -- cgit v1.2.3