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:
@ -64,6 +64,8 @@ CMeter::CMeter(CMeterWindow* meterWindow)
|
||||
m_AntiAlias = false;
|
||||
m_DynamicVariables = false;
|
||||
m_Initialized = false;
|
||||
m_HasMouseAction = false;
|
||||
m_MouseActionCursor = true;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -271,6 +273,15 @@ void CMeter::ReadConfig(const WCHAR* section)
|
||||
m_MouseOverAction = parser.ReadString(section, L"MouseOverAction", L"");
|
||||
m_MouseLeaveAction = parser.ReadString(section, L"MouseLeaveAction", L"");
|
||||
|
||||
m_MouseActionCursor = 0!= parser.ReadInt(section, L"MouseActionCursor", 1);
|
||||
|
||||
if(!m_MiddleMouseUpAction.empty() || !m_MiddleMouseDownAction.empty()
|
||||
|| !m_LeftMouseUpAction.empty() || !m_LeftMouseDownAction.empty()
|
||||
|| !m_RightMouseUpAction.empty() || !m_RightMouseDownAction.empty() )
|
||||
{
|
||||
m_HasMouseAction = true;
|
||||
}
|
||||
|
||||
m_MeasureName = parser.ReadString(section, L"MeasureName", L"");
|
||||
|
||||
m_UpdateDivider = parser.ReadInt(section, L"UpdateDivider", 1);
|
||||
|
Reference in New Issue
Block a user