Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/gui/gl/glgui_cursor.h @ 8312

Last change on this file since 8312 was 8299, checked in by bensch, 18 years ago

gui: YEAH. the cursor works quite cool :)

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
14class TextureSequence;
15
16namespace OrxGui
17{
18  // FORWARD DECLARATION
19
20  //! This is part of the openglGUI class
21  /**
22   *
23   */
24  class GLGuiCursor : public GLGuiWidget, public EventListener
25  {
26
27  public:
28    GLGuiCursor();
29    virtual ~GLGuiCursor();
30
31    static void setMouseSensitivity(float mouseSensitivity);
32    static float mouseSensitivity() { return GLGuiCursor::_mouseSensitivity; };
33
34    void setMaxBorders(const Vector2D& maxBorders) { this->_maxBorders = maxBorders; };
35
36    void init();
37    const Vector2D& position() const { return Element2D::getAbsCoor2D(); }
38
39
40    virtual void tick(float dt);
41    virtual void draw() const;
42    virtual void process(const Event& event);
43  private:
44
45    Vector2D      _maxBorders;
46
47    Vector2D      newPos;
48    Vector2D      movement;
49
50    float         color; // so f****ing temporary... ... ....
51
52    static float _mouseSensitivity;
53    TextureSequence* seq;
54    float frameNumber;
55
56  };
57}
58#endif /* _GLGUI_CURSOR_H */
Note: See TracBrowser for help on using the repository browser.