Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/MouseAPI_FS19/src/modules/MouseAPIExample/mouseapiexample.h @ 12394

Last change on this file since 12394 was 12377, checked in by tkuonen, 6 years ago

Improve MouseAPI
Add Comments
Cleanup

File size: 922 bytes
Line 
1#ifndef MOUSEAPIEXAMPLE_H
2#define MOUSEAPIEXAMPLE_H
3
4#include <core/XMLPort.h>
5#include <MouseAPI/mouseapi.h>
6#include <core/CoreIncludes.h>
7#include <worldentities/ControllableEntity.h>
8#include <list>
9
10namespace orxonox
11{
12class MouseAPIExample : public ControllableEntity
13{
14public:
15    MouseAPIExample(Context *context);
16    ~MouseAPIExample();
17    virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
18    void changesizeonclick(MouseButtonCode::ByEnum mouse);
19    void changesizeonscroll(int abs,int rel,const IntVector2& mousePos);
20    void clickleft(MouseButtonCode::ByEnum mouse);
21    void clickright(MouseButtonCode::ByEnum mouse);
22    inline void setId(int id)
23        { this->id = id; }
24    inline int getId() const
25        { return this->id; }
26private:
27    int id;
28    ClickableElementID cubeid;
29    ScrollableElementID sphereid;
30    ClickableElementID leftid,rightid;
31};
32}
33#endif // MOUSEAPIEXAMPLE_H
Note: See TracBrowser for help on using the repository browser.