Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/heathaze/src/lib/gui/gl/glgui_cursor.h @ 10585

Last change on this file since 10585 was 9869, checked in by bensch, 18 years ago

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

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