It is currently April 23rd, 2024, 8:37 pm

Button To Change Color across multiple skins

Get help with creating, editing & fixing problems with skins
User avatar
brijamelsh
Posts: 47
Joined: July 16th, 2010, 4:24 am

Button To Change Color across multiple skins

Post by brijamelsh »

I am trying to find a way to change a color across multiple skins.

i.e. you click a color swatch and the active color changes in all your skins.

Ive tried to use the setvariable bang to change the color variable in a inc file and then refresh the skin, but it doesn't seem to do anything with inc files.

The only way I've seen it done in the past is through a custom config.exe, which is beyond me.

Has anyone seen this before, or does anyone know how to do it?
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Button To Change Color across multiple skins

Post by jsmorley »

User avatar
brijamelsh
Posts: 47
Joined: July 16th, 2010, 4:24 am

Re: Button To Change Color across multiple skins

Post by brijamelsh »

Yesh Ive seen this before, but it doesnt really do what I am trying to.
Pyroxyde
Posts: 6
Joined: February 19th, 2014, 9:12 pm

Re: Button To Change Color across multiple skins

Post by Pyroxyde »

Hi !

And sorry to bump this old thread.

But I wonder if there is an answer (because the link above is not available).

Thanks.
User avatar
JosephB2000
Posts: 155
Joined: July 29th, 2014, 7:02 pm

Re: Button To Change Color across multiple skins

Post by JosephB2000 »

Pyroxyde wrote:Hi !

And sorry to bump this old thread.

But I wonder if there is an answer (because the link above is not available).

Thanks.
What you will need is a variables.inc which contains the colour you want to change.

Now you can do two things, either:
  • Change the colour variable in the .inc file and then manually refresh every skin.
Or
  • Make a meter that has a !bang like this:

Code: Select all

LeftMouseUpAction=[!WriteKeyValue Colour 255,255,255 #@#Variables.inc][!Refresh *]
If you need more help, ask and I will do my best to help you :P
[Insert Joke Here]
Pyroxyde
Posts: 6
Joined: February 19th, 2014, 9:12 pm

Re: Button To Change Color across multiple skins

Post by Pyroxyde »

Wow, what a fast answer, thanks !

This looks good but I also would like to cycle between various colours. I'm sorry, I have forgotten to talk about that in the previous post.

This is a bit more complicated now. :(
User avatar
balala
Rainmeter Sage
Posts: 16164
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Button To Change Color across multiple skins

Post by balala »

What color would you like to cycle between?
User avatar
JosephB2000
Posts: 155
Joined: July 29th, 2014, 7:02 pm

Re: Button To Change Color across multiple skins

Post by JosephB2000 »

I am not entirely sure what you want, but I think what you want is for the colours to slowly change as time goes by.

This can be done using the skin Here
[Insert Joke Here]
Pyroxyde
Posts: 6
Joined: February 19th, 2014, 9:12 pm

Re: Button To Change Color across multiple skins

Post by Pyroxyde »

Hum, no again. Sorry. :(

I'll try to give more details. Si, what I want is :
- A button which change the color of all skins when clicking on it.
- Each time we click on it, color change trough a list of predefined value, for example
- Default color is 0,255,0 and the button displays "Irish Clover",
- Then, after clicking on it, it switch all the skins to the next predefined color, let says 255,0,0. The button now is displaying "Hellish Fire".
- Again clicking on it, skins change to 35,45,255 and button says "Stange Blue". Another click and the color switch back to the default "Irish Clover" color.

I hope this is possible by modifying the code JosephB2000 wrote. But I can't see how to do it.

Thanks.
User avatar
JosephB2000
Posts: 155
Joined: July 29th, 2014, 7:02 pm

Re: Button To Change Color across multiple skins

Post by JosephB2000 »

That narrows down the solution alot more. I now understand what you want!

What you want is maybe something like this:

Code: Select all

[Variables]
MainColour=0,255,0

IrishClover=0
HellishFire=1
StrangeBlue=1

[IrishCloverButton]
Meter=String
W=20
H=20
Text=Irish Clover
SolidColor=0,255,0
FontColor=255,255,255
Hidden=#IrishClover#
LeftMouseUpAction=[!WriteKeyValue Variables IrishClover 1][!WriteKeyValue Variables HellishFire 0][!WriteKeyValue Variables MainColour 255,0,0][!Refresh *]

[HellishFireButton]
Meter=String
W=20
H=20
Text=Hellish Fire
SolidColor=255,0,0
FontColor=255,255,255
Hidden=#HellishFire#
LeftMouseUpAction=[!WriteKeyValue Variables HellishFire 1][!WriteKeyValue Variables StrangeBlue 0][!WriteKeyValue Variables MainColour 35,45,255][!Refresh *]

[StrangeBlueButton]
Meter=String
W=20
H=20
Text=Strange Blue
SolidColor=35,45,255
FontColor=255,255,255
Hidden=#StrangeBlue#
LeftMouseUpAction=[!WriteKeyValue Variables StrangeBlue 1][!WriteKeyValue Variables IrishClover 0][!WriteKeyValue Variables MainColour 0,255,0][!Refresh *]
The pattern is not hard to understand, so you will be able to do this with hundreds of buttons.

I hope this helped!
[Insert Joke Here]