summaryrefslogtreecommitdiff
path: root/cObjectHandler.h
diff options
context:
space:
mode:
authorGravatar jonas <himself@jonasgunz.de> 2018-12-28 13:04:01 +0100
committerGravatar jonas <himself@jonasgunz.de> 2018-12-28 13:04:01 +0100
commitc5af4c3057a904f2a037a624273c1c7a4b0295a5 (patch)
tree4af973d27706db05a5fba267fa93370429a056d3 /cObjectHandler.h
parent3cfea2815e3edfeb15fd7f0173957254babc7326 (diff)
downloadtermgl-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.h18
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;
};