Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/gui/gl_gui/glgui_cursor.h @ 8063

Last change on this file since 8063 was 7919, checked in by bensch, 19 years ago

orxonox/trunk: merged the gui branche back
merged with command:
https://svn.orxonox.net/orxonox/branches/gui
no conflicts

File size: 1.1 KB
Line 
1/*!
2 * @file glgui_cursor.h
3 * The gl_cursor widget of th openglGUI
4 *
5 */
6
7#ifndef _GLGUI_CURSOR_H
8#define _GLGUI_CURSOR_H
9
10#include "glgui_widget.h"
11#include "event_listener.h"
12#include "vector2D.h"
13
14namespace OrxGui
15{
16  // FORWARD DECLARATION
17
18  //! This is part of the openglGUI class
19  /**
20   *
21   */
22  class GLGuiCursor : public GLGuiWidget, public EventListener
23  {
24
25  public:
26    GLGuiCursor();
27    virtual ~GLGuiCursor();
28
29    static void setMouseSensitivity(float mouseSensitivity);
30    static float mouseSensitivity() { return GLGuiCursor::_mouseSensitivity; };
31
32    void setMaxBorders(const Vector2D& maxBorders) { this->_maxBorders = maxBorders; };
33
34    void init();
35    const Vector2D& position() const { return Element2D::getAbsCoor2D(); }
36
37
38    virtual void tick(float dt);
39    virtual void draw() const;
40    virtual void process(const Event& event);
41  private:
42
43    Vector2D      _maxBorders;
44
45    Vector2D      newPos;
46    Vector2D      movement;
47
48    float         color; // so f****ing temporary... ... ....
49
50    static float _mouseSensitivity;
51
52  };
53}
54#endif /* _GLGUI_CURSOR_H */
Note: See TracBrowser for help on using the repository browser.