It is currently April 18th, 2024, 4:51 pm

Switch between images on click

Get help with creating, editing & fixing problems with skins
Smorkster
Posts: 19
Joined: April 30th, 2012, 12:33 pm

Switch between images on click

Post by Smorkster »

I have created a skin (A) that switches between showing/hiding two skins (B and C) on the same spot.
Now I want the skin (A) to switch between two images (i.e. 'Skin B'/'Skin C') so I know witch to switch to.

I have searched the web for tips, but haven't found anything yet. How to do this?
User avatar
KreAch3R
Posts: 608
Joined: February 7th, 2011, 7:27 pm
Location: Thessaloniki, GR

Re: Switch between images on click

Post by KreAch3R »

Please elaborate a little on what you are trying to do. You want a "button" that upon pressing, will hide an image and display another one on the same spot as the other image?
Inactive, due to life changes. Send me a PM for any question.

Desktop DeviartArt
Image
Smorkster
Posts: 19
Joined: April 30th, 2012, 12:33 pm

Re: Switch between images on click

Post by Smorkster »

OK, might have been a somewhat fuzy description :)

I now have two skins showing text, lets call them 'Skin A' and 'Skin B'. I have placed them on the same spot on the screen so they are overlapping.
I then have created a third skin, lets call it 'Skin C'. The function of Skin C is to act as a button and when it is clicked, it will switch which of Skin A and Skin B is to shown (by using ToggleFade).
So... when Rainmeter starts, Skin A is shown and Skin B is hidden. When I click Skin C, Skin A is hidden and Skin B is shown. I now want an image to show in Skin C that will switch when pressed.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Switch between images on click

Post by smurfier »

Code: Select all

[Variables]
Num=0

[Image]
Meter=Image
ImageName=Image#Num#.png
LeftMouseUpAction=!SetVariable Num (1-#Num#)
DynamicVariables=1
Just add that bang to the action that switches your skins around and have Image0 and Image1 in your skin folder.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
Smorkster
Posts: 19
Joined: April 30th, 2012, 12:33 pm

Re: Switch between images on click

Post by Smorkster »

Thanks.
Looks like a smart solution :)