From 1fc30fc77b5588c4b651085c21003aceb4ec5083 Mon Sep 17 00:00:00 2001 From: Vojtech Bocek Date: Wed, 29 Jan 2014 18:37:19 +0100 Subject: Implement mouse cursor Signed-off-by: Vojtech Bocek Change-Id: I66d6db7b3ed9cca50b469d125b36224332e06913 --- gui/objects.hpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'gui/objects.hpp') diff --git a/gui/objects.hpp b/gui/objects.hpp index 1053113bd..e8110b016 100644 --- a/gui/objects.hpp +++ b/gui/objects.hpp @@ -978,6 +978,31 @@ protected: int lineW; }; +class MouseCursor : public RenderObject +{ +public: + MouseCursor(int posX, int posY); + virtual ~MouseCursor(); + + virtual int Render(void); + virtual int Update(void); + virtual int SetRenderPos(int x, int y, int w = 0, int h = 0); + + void Move(int deltaX, int deltaY); + void GetPos(int& x, int& y); + void LoadData(xml_node<>* node); + void ResetData(int resX, int resY); + +private: + int m_resX; + int m_resY; + bool m_moved; + float m_speedMultiplier; + COLOR m_color; + Resource *m_image; + bool m_present; +}; + // Helper APIs bool LoadPlacement(xml_node<>* node, int* x, int* y, int* w = NULL, int* h = NULL, RenderObject::Placement* placement = NULL); -- cgit v1.2.3