diff options
Diffstat (limited to '')
-rw-r--r-- | src/menu/software_mouse_pointer.hpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/menu/software_mouse_pointer.hpp b/src/menu/software_mouse_pointer.hpp index 0e3d2ff8..797236ff 100644 --- a/src/menu/software_mouse_pointer.hpp +++ b/src/menu/software_mouse_pointer.hpp @@ -34,6 +34,7 @@ #include "utils/disposer.hpp" #include <boost/signals2.hpp> +#include <boost/thread/shared_mutex.hpp> #include <GL/gl.h> namespace usdx @@ -44,12 +45,21 @@ namespace usdx GLfloat vertices[8]; RgbaColor color; + bool down; + Disposer<Texture>* texture_normal; Disposer<Texture>* texture_pressed; Timer* fade_inactive; boost::signals2::connection mouse_move_connection; + boost::signals2::connection mouse_down_connection; + boost::signals2::connection mouse_up_connection; + + mutable boost::shared_mutex down_mutex; + + Texture* get_current_texture() const; + void update(void); protected: void draw(void); @@ -59,6 +69,10 @@ namespace usdx virtual ~SoftwareMousePointer(); void on_mouse_move(uint16_t x, uint16_t y); + void on_mouse_down(uint8_t button, uint16_t x, uint16_t y); + void on_mouse_up(uint8_t button, uint16_t x, uint16_t y); + + bool is_down(void) const; }; }; |