mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Added MattKing's code to enable the standard "hand pointer" mouse cursor when you hover over a meter with any "MouseAction" on it or a button.
This behavior is ON by default. If you do not want the cursor change on a meter or button, set MouseActionCursor=0 on the Meter or button. Example of disabling mouse cursor change: [Meter] Meter=Image W=100 H=100 SolidColor=0,0,0,255 LeftMouseUpAction=!Execute ["http://rainmeter.net"] MouseActionCursor=0 Note: If you have a button with a meter (either image or text) on TOP of it, you will need to set MouseActionCursor=0 on the image/text meter even if it doesn't have a mouse action, or the button will not change cursors.
This commit is contained in:
@ -59,6 +59,9 @@ public:
|
||||
std::wstring& GetMouseOverAction() { return m_MouseOverAction; };
|
||||
std::wstring& GetMouseLeaveAction() { return m_MouseLeaveAction; };
|
||||
|
||||
bool HasMouseAction() { return m_HasMouseAction; };
|
||||
bool HasMouseActionCursor() { return m_MouseActionCursor; };
|
||||
|
||||
void Hide() { m_Hidden = true; };
|
||||
void Show() { m_Hidden = false; };
|
||||
bool IsHidden() { return m_Hidden; };
|
||||
@ -74,7 +77,7 @@ public:
|
||||
const WCHAR* GetName() { return m_Name.c_str(); };
|
||||
|
||||
static CMeter* Create(const WCHAR* meter, CMeterWindow* meterWindow);
|
||||
|
||||
|
||||
static void DrawBevel(Gdiplus::Graphics& graphics, Gdiplus::Rect& rect, Gdiplus::Pen& light, Gdiplus::Pen& dark);
|
||||
|
||||
protected:
|
||||
@ -116,6 +119,9 @@ protected:
|
||||
std::wstring m_MiddleMouseUpAction;
|
||||
std::wstring m_MouseOverAction;
|
||||
std::wstring m_MouseLeaveAction;
|
||||
|
||||
bool m_HasMouseAction;
|
||||
bool m_MouseActionCursor;
|
||||
|
||||
bool m_MouseOver;
|
||||
METER_POSITION m_RelativeX;
|
||||
|
Reference in New Issue
Block a user