diff options
author | jonas <himself@jonasgunz.de> | 2018-12-28 13:04:01 +0100 |
---|---|---|
committer | jonas <himself@jonasgunz.de> | 2018-12-28 13:04:01 +0100 |
commit | c5af4c3057a904f2a037a624273c1c7a4b0295a5 (patch) | |
tree | 4af973d27706db05a5fba267fa93370429a056d3 /cObjectHandler.h | |
parent | 3cfea2815e3edfeb15fd7f0173957254babc7326 (diff) | |
download | termgl-c5af4c3057a904f2a037a624273c1c7a4b0295a5.tar.gz |
Adding Click and Char event handling and focusing to cObjectHandler
cObject: is now able to be parent class
cObjectHandler: Implemented
Diffstat (limited to 'cObjectHandler.h')
-rw-r--r-- | cObjectHandler.h | 18 |
1 files changed, 18 insertions, 0 deletions
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<cObject*> objects; + vector<vector<unsigned int>> iHitMap; cRender *render; + unsigned long int iActiveObject; }; |