It is currently March 29th, 2024, 6:44 am

Highlight select

Get help with creating, editing & fixing problems with skins
User avatar
Alloutofmercy
Posts: 142
Joined: November 17th, 2021, 5:51 am

Highlight select

Post by Alloutofmercy »

You do not have the required permissions to view the files attached to this post.
BOOTY
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Highlight select

Post by balala »

Alloutofmercy wrote: December 10th, 2021, 4:21 am Any idea how this skin does this?
What exactly how it does?
User avatar
Alloutofmercy
Posts: 142
Joined: November 17th, 2021, 5:51 am

Re: Highlight select

Post by Alloutofmercy »

While selecting the options the oultline indicator indicates what is selected. I want to apply the same for my skin aswell, thats why I had asked if how that was possible
BOOTY
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Highlight select

Post by death.crafter »

Alloutofmercy wrote: December 10th, 2021, 1:49 pm While selecting the options the oultline indicator indicates what is selected. I want to apply the same for my skin aswell, thats why I had asked if how that was possible
A variable probably.

Try this:

Code: Select all

[Rainmeter]
Update = 1000
OnRefreshAction = [!SetOption Bg#Player# FColor "Fill Color [#[#Player]Active]"][!UpdateMeter Bg#Player#][!Redraw]

[Variables]
; Spotify | iTunes | CAD | WMP
Player = Spotify

SpotifyActive = 30,215,96
iTunesActive = 184,250,255
CADActive = 71,18,9
WMPActive = 122,122,122

[BgSpotify]
Meter = Shape
X = 5
Y = 5R
Shape = Rectangle 0,0,100,50,5 | StrokeWidth 2 | Stroke Color #SpotifyActive# | Extend FColor
FColor = Fill Color 0,0,0,0

[BgiTunes]
Meter = Shape
X = 5
Y = 5R
Shape = Rectangle 0,0,100,50,5 | StrokeWidth 2 | Stroke Color #iTunesActive# | Extend FColor
FColor = Fill Color 0,0,0,0

[BgCAD]
Meter = Shape
X = 5
Y = 5R
Shape = Rectangle 0,0,100,50,5 | StrokeWidth 2 | Stroke Color #CADActive# | Extend FColor
FColor = Fill Color 0,0,0,0

[BgWMP]
Meter = Shape
X = 5
Y = 5R
Shape = Rectangle 0,0,100,50,5 | StrokeWidth 2 | Stroke Color #WMPActive# | Extend FColor
FColor = Fill Color 0,0,0,0
from the Realm of Death
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Highlight select

Post by balala »

Alloutofmercy wrote: December 10th, 2021, 1:49 pm I want to apply the same for my skin aswell, thats why I had asked if how that was possible
You have to modify the parameters of the meter when hovering the mouse over, respectively when leaving it. What you modify depends on the meter itself and your desire, but here is an example:

Code: Select all

[MeterMyButton]
Meter=Shape
X=2
Y=2
Shape=Rectangle 0,0,100,30,5 | Extend MyModifiers1, MyModifiers2, MyModifiers3
MyModifiers1=Fill Color 191,237,239,255
MyModifiers2=StrokeWidth 4
MyModifiers3=Stroke Color 46,115,31,255
MouseOverAction=[!SetOption #CURRENTSECTION# MyModifiers3 "Stroke Color 246,115,31,255"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# MyModifiers3 "Stroke Color 46,115,31,255"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
As you can see when hovering the mouse over this Shape meter, the !SetOption bang of the MouseOverAction option replaces the MyModifiers3 option with a new color. When leaving it, the MouseLeaveAction option modifies it back.
Hope it is clear, Please come back if it isn't.
GIF.gif
You do not have the required permissions to view the files attached to this post.
User avatar
Alloutofmercy
Posts: 142
Joined: November 17th, 2021, 5:51 am

Re: Highlight select

Post by Alloutofmercy »

I want to make it stay when I click it like when if you select foobar2000, it highlights foobar2000 and not other options
BOOTY
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Highlight select

Post by death.crafter »

Alloutofmercy wrote: December 10th, 2021, 4:30 pm I want to make it stay when I click it like when if you select foobar2000, it highlights foobar2000 and not other options
See the previous post. Well, ofc you've to tweak to make it work for you. But yes, that's one of the many ways it can be done.
from the Realm of Death
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Highlight select

Post by balala »

Alloutofmercy wrote: December 10th, 2021, 4:30 pm I want to make it stay when I click it like when if you select foobar2000, it highlights foobar2000 and not other options
Besides death.crafter's solution, here is mine. Note that I have added four buttons, but this can easily be modified to any number you want / need. Whenever are you hovering the mouse over any of these buttons, you get changed its background color and when you're clicking it, you get changed the color of its border. The change of border is permanent, so you can even refresh the skin the appropriate button remains highlighted.
If you take a look to the code you can extend the IfTrueAction options of the [MeasurePlayer] measure, adding any suplimentar bangs you need.

Code: Select all

[Rainmeter]

[Variables]
Player=0
NormalColor=46,115,31,255
HighlightColor=246,115,31,255
NormalBackgrondColor=50,50,50,200
HighlightBackgroundColor=150,150,150,200

[ButtonStyle]
Shape=Rectangle 0,0,100,30,5 | Extend MyModifiers1, MyModifiers2, MyModifiers3
MyModifiers1=Fill Color #NormalBackgrondColor#
MyModifiers2=StrokeWidth 4
;MyModifiers3=Stroke Color #NormalColor#
Group=Buttons

[MeasurePlayer]
Measure=Calc
Formula=#Player#
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!WriteKeyValue Variables Player "0"][!SetOption MeterMyButton1 MyModifiers3 "Stroke Color #NormalColor#"][!SetOption MeterMyButton2 MyModifiers3 "Stroke Color #NormalColor#"][!SetOption MeterMyButton3 MyModifiers3 "Stroke Color #NormalColor#"][!SetOption MeterMyButton4 MyModifiers3 "Stroke Color #NormalColor#"][!UpdateMeterGroup "Buttons"][!Redraw]
IfCondition2=(#CURRENTSECTION#=1)
IfTrueAction2=[!WriteKeyValue Variables Player "1"][!SetOption MeterMyButton1 MyModifiers3 "Stroke Color #HighlightColor#"][!SetOption MeterMyButton2 MyModifiers3 "Stroke Color #NormalColor#"][!SetOption MeterMyButton3 MyModifiers3 "Stroke Color #NormalColor#"][!SetOption MeterMyButton4 MyModifiers3 "Stroke Color #NormalColor#"][!UpdateMeterGroup "Buttons"][!Redraw]
IfCondition3=(#CURRENTSECTION#=2)
IfTrueAction3=[!WriteKeyValue Variables Player "2"][!SetOption MeterMyButton1 MyModifiers3 "Stroke Color #NormalColor#"][!SetOption MeterMyButton2 MyModifiers3 "Stroke Color #HighlightColor#"][!SetOption MeterMyButton3 MyModifiers3 "Stroke Color #NormalColor#"][!SetOption MeterMyButton4 MyModifiers3 "Stroke Color #NormalColor#"][!UpdateMeterGroup "Buttons"][!Redraw]
IfCondition4=(#CURRENTSECTION#=3)
IfTrueAction4=[!WriteKeyValue Variables Player "3"][!SetOption MeterMyButton1 MyModifiers3 "Stroke Color #NormalColor#"][!SetOption MeterMyButton2 MyModifiers3 "Stroke Color #NormalColor#"][!SetOption MeterMyButton3 MyModifiers3 "Stroke Color #HighlightColor#"][!SetOption MeterMyButton4 MyModifiers3 "Stroke Color #NormalColor#"][!UpdateMeterGroup "Buttons"][!Redraw]
IfCondition5=(#CURRENTSECTION#=4)
IfTrueAction5=[!WriteKeyValue Variables Player "4"][!SetOption MeterMyButton1 MyModifiers3 "Stroke Color #NormalColor#"][!SetOption MeterMyButton2 MyModifiers3 "Stroke Color #NormalColor#"][!SetOption MeterMyButton3 MyModifiers3 "Stroke Color #NormalColor#"][!SetOption MeterMyButton4 MyModifiers3 "Stroke Color #HighlightColor#"][!UpdateMeterGroup "Buttons"][!Redraw]
DynamicVariables=1

[MeterMyButton1]
Meter=Shape
MeterStyle=ButtonStyle
X=2
Y=2
MouseOverAction=[!SetOption #CURRENTSECTION# MyModifiers1 "Fill Color #HighlightBackgroundColor#"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# MyModifiers1 "Fill Color #NormalBackgrondColor#"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
LeftMouseUpAction=[!SetVariable Player "1"][!UpdateMeasure "MeasurePlayer"]

[MeterMyButton2]
Meter=Shape
MeterStyle=ButtonStyle
X=0r
Y=10R
MouseOverAction=[!SetOption #CURRENTSECTION# MyModifiers1 "Fill Color #HighlightBackgroundColor#"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# MyModifiers1 "Fill Color #NormalBackgrondColor#"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
LeftMouseUpAction=[!SetVariable Player "2"][!UpdateMeasure "MeasurePlayer"]

[MeterMyButton3]
Meter=Shape
MeterStyle=ButtonStyle
X=0r
Y=10R
MouseOverAction=[!SetOption #CURRENTSECTION# MyModifiers1 "Fill Color #HighlightBackgroundColor#"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# MyModifiers1 "Fill Color #NormalBackgrondColor#"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
LeftMouseUpAction=[!SetVariable Player "3"][!UpdateMeasure "MeasurePlayer"]

[MeterMyButton4]
Meter=Shape
MeterStyle=ButtonStyle
X=0r
Y=10R
MouseOverAction=[!SetOption #CURRENTSECTION# MyModifiers1 "Fill Color #HighlightBackgroundColor#"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# MyModifiers1 "Fill Color #NormalBackgrondColor#"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
LeftMouseUpAction=[!SetVariable Player "4"][!UpdateMeasure "MeasurePlayer"]
Feel free to ask if anything is not clear.
You do not have the required permissions to view the files attached to this post.
User avatar
Alloutofmercy
Posts: 142
Joined: November 17th, 2021, 5:51 am

Re: Highlight select

Post by Alloutofmercy »

Thanks, I'll try it right away
BOOTY
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Highlight select

Post by balala »

Alloutofmercy wrote: December 11th, 2021, 1:28 pm I'll try it right away
If you're talking about my code, please let me know what you think about it.