diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2019-02-10 00:53:58 +0100 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2019-02-10 00:53:58 +0100 |
commit | 5bfaf048e81900ffdc0bb2815f8465235c4462d5 (patch) | |
tree | 5264bf22976d9dd666fceb8dc7d337e9b71fa787 /cObjectHandler.h | |
parent | 4e59b62be595d9c0e1e95f51c6c4c25f37bdb783 (diff) | |
parent | c459b4901f3f453f83a93a38228e3241dd8190c2 (diff) | |
download | termgl-5bfaf048e81900ffdc0bb2815f8465235c4462d5.tar.gz |
Merge branch 'master' of https://gitlab.lrz.de/ge49jic/engine
Diffstat (limited to 'cObjectHandler.h')
-rw-r--r-- | cObjectHandler.h | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/cObjectHandler.h b/cObjectHandler.h index f118d8a..bc6a48d 100644 --- a/cObjectHandler.h +++ b/cObjectHandler.h @@ -12,27 +12,32 @@ using namespace std; -/** Manages cObjects and writes them to screenbuffer -* forwards input events to cObjects +/** +* Manages cObject and cWiremesh and writes them to a cRender framebuffer. +* forwards input events to corresponding cObject. */ class cObjectHandler { public: - /** *_render: pointer to instance of cRender all objects will be written to + /** + * *_render: pointer to instance of cRender all objects will be written to */ explicit cObjectHandler(cRender *_render); - /** Adds _object to managed objects vector + /** + * Adds _object to managed objects vector * returns Identifier for newly created vector */ int createObject(cObject *_object); - /** Alters position of _object by _pos either relative to old position or Absolute + /** + * Alters position of _object by _pos either relative to old position or Absolute * Depending on selected _mode (_MOVE_RELATIVE / _MOVE_ABSOLUTE). */ int moveObject(int _object, sPos _pos, int _mode); - /** removes _object from vector after deleting it + /** + * removes _object from vector after deleting it */ int destroyObject(int _object); @@ -48,26 +53,31 @@ public: int destroyWiremesh(int _mesh); - /** writes all objects in objects[] to render buffer + /** + * writes all objects in objects[] to render buffer */ int write(); - /** Calls onClick of cObject at _pos, focuses Object + /** + * Calls onClick of cObject at _pos, focuses Object * returns 0 if successfull, 1 if no Object is at _pos */ int clickEvent(sPos _pos, unsigned int _button); - /** Calls onChar of active cObject, default 0 + /** + * Calls onChar of active cObject, default 0 * returns 0 if successfull, 1 if no Object or destroyed Object is empty */ int charEvent(unsigned char _c); - /** Focuses next Object + /** + * Focuses next Object */ void focusNext(); - /**Focuses Object by id. + /** + * Focuses Object by id. * 0 is empty by default and can be used to unfocus */ void focus(unsigned int _id); |