It is currently April 27th, 2024, 2:51 am

Showing/Hiding Shape Meter On Mouseover ?

Get help with creating, editing & fixing problems with skins
Jordan
Posts: 2
Joined: May 10th, 2021, 9:43 pm

Showing/Hiding Shape Meter On Mouseover ?

Post by Jordan »

I'm currently trying to make "highlights" that show on mouseover behind text.

Code: Select all

[MediaPlayerBarHighlight]
Meter=Shape
Shape=Rectangle 1669,0,150,25,5 | Fill Color (#R2#),(#G2#),(#B2#),150) | StrokeWidth 0
Hidden=1
DynamicVariables=1
LeftMouseDownAction=!ToggleConfig "KawaiiBar\Widgets" "MediaPlayer.ini"
MouseOverAction=
MouseLeaveAction=
@include3=#@#Widgets\MediaPlayer.ini 
.
Ive tried multiple different configurations and have had no success.
if anybody knows what i should use to hide and show this meter that would be amazing, thank you !
Screenshot_1.png
You do not have the required permissions to view the files attached to this post.
Last edited by balala on May 11th, 2021, 9:07 am, edited 1 time in total.
Reason: Please use <code> tags whenever are you posting code snippets. It's the</> button.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Showing/Hiding Shape Meter On Mouseover ?

Post by eclectic-tech »

Jordan wrote: May 10th, 2021, 9:49 pm I'm currently trying to make "highlights" that show on mouseover behind text.

[MediaPlayerBarHighlight]
Meter=Shape
Shape=Rectangle 1669,0,150,25,5 | Fill Color (#R2#),(#G2#),(#B2#),150 | StrokeWidth 0
Hidden=1
DynamicVariables=1
LeftMouseDownAction=!ToggleConfig "KawaiiBar\Widgets" "MediaPlayer.ini"
MouseOverAction=
MouseLeaveAction=
@include3=#@#Widgets\MediaPlayer.ini
.
Ive tried multiple different configurations and have had no success.
if anybody knows what i should use to hide and show this meter that would be amazing, thank you !
Screenshot_1.png
It would help to see all of your code or better yet a link to download the entire skin.

One option, if you only want to hide this meter, rather than use "Hidden=1", is to create an "Alpha1" variable and use that to hide/show this meter.

Note that I commented out the hidden line. Changing the value of "Alph1" from 150 to 1 and back, will essential make the meter be drawn with an almost invisible color. The meter will be not be visible until you mouse over it, then it will be shown.

Not sure if any other parts of your code will effect this, but with the code you posted, this change will hide/show the meter on mouse hover.

Code: Select all

[MediaPlayerBarHighlight]
Meter=Shape
Shape=Rectangle 1669,0,150,25,5 | Fill Color (#R2#),(#G2#),(#B2#),#Alpha1# | StrokeWidth 0
;Hidden=1
DynamicVariables=1
LeftMouseDownAction=!ToggleConfig "KawaiiBar\Widgets" "MediaPlayer.ini"
MouseOverAction=[!SetVariable Alpha1 150][!UpdateMeter MediaPlayerBarHighlight][!Redraw]
MouseLeaveAction=[!SetVariable Alpha1 1][!UpdateMeter MediaPlayerBarHighlight][!Redraw]
@include3=#@#Widgets\MediaPlayer.ini
Edit: Removed inadvertent parenthesis from alpha value of shape (thanks balala)
Jordan
Posts: 2
Joined: May 10th, 2021, 9:43 pm

Re: Showing/Hiding Shape Meter On Mouseover ?

Post by Jordan »

That did the trick , I swear I tried 100 things haha. I appreciate you.


For others that may be stuck my code is more like this now.

In fill colour the order is "Red,Green,Blue,Transparency".
So for the transparency value I put (#MediaHL#) which will make it whatever MediaHl equals in my Variables, You can name this whatever you want as long as you have all of them corresponding.
I hope this helps anybody else who was stuck like I was !
Happy coding !

Code: Select all

[Variables]
MediaHL=1

[MediaPlayerBarHighlight]
Meter=Shape
Shape=Rectangle 1669,0,150,25,5 | Fill Color (#R2#),(#G2#),(#B2#),(#MediaHL#) | StrokeWidth 0
Hidden=(#TempHid#)
LeftMouseDownAction=!ToggleConfig "KawaiiBar\Widgets" "MediaPlayer.ini"
DynamicVariables=1
MouseOverAction=[!SetVariable MediaHL "100"][!update]
MouseLeaveAction=[!SetVariable MediaHL "1"][!update]
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Showing/Hiding Shape Meter On Mouseover ?

Post by balala »

Jordan wrote: May 10th, 2021, 9:49 pm

Code: Select all

[MediaPlayerBarHighlight]
Meter=Shape
Shape=Rectangle 1669,0,150,25,5 | Fill Color (#R2#),(#G2#),(#B2#),150) | StrokeWidth 0
Hidden=1
DynamicVariables=1
LeftMouseDownAction=!ToggleConfig "KawaiiBar\Widgets" "MediaPlayer.ini"
MouseOverAction=
MouseLeaveAction=
@include3=#@#Widgets\MediaPlayer.ini 
Note that there is small mistake in the Shape option: the opening parenthese of the Alpha value into the Fill Color parameter is missing. The mistake has been taken over by eclectic-tech as well in his reply. In fact all those parentheses are useless, you can get rid of them, not being needed: Shape=Rectangle 1669,0,150,25,5 | Fill Color #R2#,#G2#,#B2#,#Alpha1# | StrokeWidth 0.