It is currently August 8th, 2020, 11:38 pm

Custom Tooltip Skin

Tips and Tricks from the Rainmeter Community
User avatar
Yincognito
Posts: 2200
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Custom Tooltip Skin

Post by Yincognito »

ms310 wrote:
April 8th, 2020, 5:51 am
Thank you so much!
You're welcome. I forgot to mention something in the included comments - for subsequent meters that you want to add custom tooltips, you should:
- set the PI variable to similarly subsequent numbers after you copy paste the needed MouseOverAction / MouseLeaveAction to those meters
- copy paste subsequent IfConditions in [MeasurePopulateTooltip], corresponding to the newly added PI values

It's obvious that such things should be done, but I mentioned them just in case you don't realize it.
goeway
Posts: 15
Joined: March 20th, 2019, 8:50 pm

Re: Custom Tooltip Skin

Post by goeway »

Thank you so much!
User avatar
Yincognito
Posts: 2200
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Custom Tooltip Skin

Post by Yincognito »

goeway wrote:
May 17th, 2020, 11:38 pm
Thank you so much!
You're welcome! In the meantime, in my skin suite, I made positioning the tooltips in a "preferred" direction possible, by replacing the IfCondition in the [MeasureMoveTooltip] from Tooltip.ini with:

Code: Select all

IfCondition=(#PP#=1) && (#TD#=1)
IfTrueAction=[!Move "(((#PX#-#MS#-#CURRENTCONFIGWIDTH#)<(#WORKAREAX#))?(#PX#+#PW#+#MS#):(#PX#-#MS#-#CURRENTCONFIGWIDTH#))" "(((#PY#+#CURRENTCONFIGHEIGHT#)>(#WORKAREAY#+#WORKAREAHEIGHT#))?(#WORKAREAY#+#WORKAREAHEIGHT#-#CURRENTCONFIGHEIGHT#):(#PY#))"][!ShowFade]
IfCondition2=(#PP#=1) && (#TD#=2)
IfTrueAction2=[!Move "(((#PX#+#CURRENTCONFIGWIDTH#)>(#WORKAREAX#+#WORKAREAWIDTH#))?(#WORKAREAX#+#WORKAREAWIDTH#-#CURRENTCONFIGWIDTH#):(#PX#))" "(((#PY#-#MS#-#CURRENTCONFIGHEIGHT#)<(#WORKAREAY#))?(#PY#+#PH#+#MS#):(#PY#-#MS#-#CURRENTCONFIGHEIGHT#))"][!ShowFade]
IfCondition3=(#PP#=1) && (#TD#=3)
IfTrueAction3=[!Move "(((#PX#+#PW#+#MS#+#CURRENTCONFIGWIDTH#)>(#WORKAREAX#+#WORKAREAWIDTH#))?(#PX#-#MS#-#CURRENTCONFIGWIDTH#):(#PX#+#PW#+#MS#))" "(((#PY#+#CURRENTCONFIGHEIGHT#)>(#WORKAREAY#+#WORKAREAHEIGHT#))?(#WORKAREAY#+#WORKAREAHEIGHT#-#CURRENTCONFIGHEIGHT#):(#PY#))"][!ShowFade]
IfCondition4=(#PP#=1) && (#TD#=4)
IfTrueAction4=[!Move "(((#PX#+#CURRENTCONFIGWIDTH#)>(#WORKAREAX#+#WORKAREAWIDTH#))?(#WORKAREAX#+#WORKAREAWIDTH#-#CURRENTCONFIGWIDTH#):(#PX#))" "(((#PY#+#PH#+#MS#+#CURRENTCONFIGHEIGHT#)>(#WORKAREAY#+#WORKAREAHEIGHT#))?(#PY#-#MS#-#CURRENTCONFIGHEIGHT#):(#PY#+#PH#+#MS#))"][!ShowFade]
IfConditionMode=1
where the TD variable name is an acronym for "tooltip direction" (1 = Left, 2 = Top, 3 = Right, 4 = Bottom, all of them relative to the hovered meter). This is by no means required, it's just a "feature" that's nice to have, assuming that the TD variable is declared and initialized somewhere in either Tooltip.ini or an .inc file used by it. In my case, I use my "settings skin" to write all these little settings in a Variables.inc that's used throughout all the skins in my suite (including Tooltip.ini):
Tooltip Settings.jpg
You do not have the required permissions to view the files attached to this post.