mirror of
				https://github.com/chibicitiberiu/rainmeter-studio.git
				synced 2024-02-24 04:33:31 +00:00 
			
		
		
		
	Change by MattKing to the MouseActionCursor feature. The user can now set MouseActionCursor=0 in the [Rainmeter] section of the skin, and the change of the cursor to the hand when over mouse action meters will be disabled for the entire skin. This can be overridden on a meter-by-meter basis with MouseActionCursor=1.
Added this change to the Meters.htm help file.
This commit is contained in:
		| @@ -272,7 +272,10 @@ void CMeter::ReadConfig(const WCHAR* section) | |||||||
| 	m_MouseOverAction = parser.ReadString(section, L"MouseOverAction", L"", false); | 	m_MouseOverAction = parser.ReadString(section, L"MouseOverAction", L"", false); | ||||||
| 	m_MouseLeaveAction = parser.ReadString(section, L"MouseLeaveAction", L"", false); | 	m_MouseLeaveAction = parser.ReadString(section, L"MouseLeaveAction", L"", false); | ||||||
|  |  | ||||||
| 	m_MouseActionCursor = 0!= parser.ReadInt(section, L"MouseActionCursor", 1); | 	if(m_MouseActionCursor == false) | ||||||
|  | 		m_MouseActionCursor = 0!= parser.ReadInt(section, L"MouseActionCursor", 0); | ||||||
|  | 	else | ||||||
|  | 		m_MouseActionCursor = 0!= parser.ReadInt(section, L"MouseActionCursor", 1); | ||||||
|  |  | ||||||
| 	m_HasMouseAction = | 	m_HasMouseAction = | ||||||
| 		( !m_MiddleMouseUpAction.empty() || !m_MiddleMouseDownAction.empty()  | 		( !m_MiddleMouseUpAction.empty() || !m_MiddleMouseDownAction.empty()  | ||||||
|   | |||||||
| @@ -61,6 +61,7 @@ public: | |||||||
|  |  | ||||||
| 	bool HasMouseAction() { return m_HasMouseAction; }; | 	bool HasMouseAction() { return m_HasMouseAction; }; | ||||||
| 	bool HasMouseActionCursor() { return m_MouseActionCursor; }; | 	bool HasMouseActionCursor() { return m_MouseActionCursor; }; | ||||||
|  | 	void SetMouseActionCursor(bool b) { m_MouseActionCursor = b; }; | ||||||
|  |  | ||||||
| 	void Hide() { m_Hidden = true; }; | 	void Hide() { m_Hidden = true; }; | ||||||
| 	void Show() { m_Hidden = false; }; | 	void Show() { m_Hidden = false; }; | ||||||
|   | |||||||
| @@ -1432,6 +1432,7 @@ void CMeterWindow::ReadSkin() | |||||||
|  |  | ||||||
| 	m_WindowUpdate = m_Parser.ReadInt(L"Rainmeter", L"Update", m_WindowUpdate); | 	m_WindowUpdate = m_Parser.ReadInt(L"Rainmeter", L"Update", m_WindowUpdate); | ||||||
| 	m_TransitionUpdate = m_Parser.ReadInt(L"Rainmeter", L"TransitionUpdate", m_TransitionUpdate); | 	m_TransitionUpdate = m_Parser.ReadInt(L"Rainmeter", L"TransitionUpdate", m_TransitionUpdate); | ||||||
|  | 	m_MouseActionCursor = 0 != m_Parser.ReadInt(L"Rainmeter", L"MouseActionCursor", 1); | ||||||
|  |  | ||||||
| 	// Checking for localfonts | 	// Checking for localfonts | ||||||
| 	std::wstring localFont1 = m_Parser.ReadString(L"Rainmeter", L"LocalFont", L""); | 	std::wstring localFont1 = m_Parser.ReadString(L"Rainmeter", L"LocalFont", L""); | ||||||
| @@ -1572,6 +1573,12 @@ void CMeterWindow::ReadSkin() | |||||||
| 					if (meter) | 					if (meter) | ||||||
| 					{ | 					{ | ||||||
| 						meter->SetName(strSection.c_str()); | 						meter->SetName(strSection.c_str()); | ||||||
|  | 						 | ||||||
|  | 						if(m_MouseActionCursor == false) | ||||||
|  | 						{ | ||||||
|  | 							meter->SetMouseActionCursor(false); | ||||||
|  | 						} | ||||||
|  |  | ||||||
| 						meter->ReadConfig(strSection.c_str()); | 						meter->ReadConfig(strSection.c_str()); | ||||||
| 						m_Meters.push_back(meter); | 						m_Meters.push_back(meter); | ||||||
| 					} | 					} | ||||||
|   | |||||||
| @@ -326,6 +326,8 @@ private: | |||||||
| 	static int c_InstanceCount; | 	static int c_InstanceCount; | ||||||
|  |  | ||||||
| 	Gdiplus::PrivateFontCollection* m_FontCollection; | 	Gdiplus::PrivateFontCollection* m_FontCollection; | ||||||
|  |  | ||||||
|  | 	bool m_MouseActionCursor; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 jsmorley
					jsmorley