source:
orxonox.OLD/trunk/src/lib/gui/gl/glgui_cursor.h
Last change on this file was 9869, checked in by bensch, 18 years ago | |
---|---|
File size: 1.3 KB |
Rev | Line | |
---|---|---|
[4838] | 1 | /*! |
[7919] | 2 | * @file glgui_cursor.h |
3 | * The gl_cursor widget of th openglGUI | |
[5360] | 4 | * |
5 | */ | |
[1853] | 6 | |
[7919] | 7 | #ifndef _GLGUI_CURSOR_H |
8 | #define _GLGUI_CURSOR_H | |
[1853] | 9 | |
[7919] | 10 | #include "glgui_widget.h" |
11 | #include "event_listener.h" | |
12 | #include "vector2D.h" | |
[1853] | 13 | |
[8324] | 14 | #include "texture_sequence.h" |
15 | ||
[8299] | 16 | class TextureSequence; |
17 | ||
[7779] | 18 | namespace OrxGui |
19 | { | |
20 | // FORWARD DECLARATION | |
[3543] | 21 | |
[7779] | 22 | //! This is part of the openglGUI class |
23 | /** | |
24 | * | |
25 | */ | |
[7919] | 26 | class GLGuiCursor : public GLGuiWidget, public EventListener |
[7779] | 27 | { |
[9869] | 28 | ObjectListDeclaration(GLGuiCursor); |
[7779] | 29 | public: |
[7919] | 30 | GLGuiCursor(); |
31 | virtual ~GLGuiCursor(); | |
[2036] | 32 | |
[7919] | 33 | |
[8324] | 34 | bool loadTextureSequence(const std::string& imagePrefix, unsigned int from, unsigned int to); |
[7919] | 35 | |
[8324] | 36 | |
[7919] | 37 | const Vector2D& position() const { return Element2D::getAbsCoor2D(); } |
[1853] | 38 | |
[8324] | 39 | void setMaxBorders(const Vector2D& maxBorders) { this->_maxBorders = maxBorders; }; |
40 | static void setMouseSensitivity(float mouseSensitivity); | |
41 | static float mouseSensitivity() { return GLGuiCursor::_mouseSensitivity; }; | |
[1853] | 42 | |
[8324] | 43 | |
[7919] | 44 | virtual void tick(float dt); |
45 | virtual void draw() const; | |
46 | virtual void process(const Event& event); | |
[8324] | 47 | |
[7779] | 48 | private: |
[8324] | 49 | void init(); |
[3245] | 50 | |
[8324] | 51 | private: |
52 | ||
[7919] | 53 | Vector2D _maxBorders; |
54 | ||
55 | Vector2D newPos; | |
56 | Vector2D movement; | |
57 | ||
58 | float color; // so f****ing temporary... ... .... | |
59 | ||
[8324] | 60 | static float _mouseSensitivity; |
61 | TextureSequence seq; | |
62 | float frameNumber; | |
[7919] | 63 | |
[7779] | 64 | }; |
65 | } | |
[7919] | 66 | #endif /* _GLGUI_CURSOR_H */ |
Note: See TracBrowser
for help on using the repository browser.