It is currently April 18th, 2024, 11:10 pm

Mouseover Image Change/Resize, X/Y Position Help?

Get help with creating, editing & fixing problems with skins
PutridMeatg
Posts: 2
Joined: December 6th, 2020, 11:30 pm

Mouseover Image Change/Resize, X/Y Position Help?

Post by PutridMeatg »

First time making a skin and I've bitten a little too much off. Any help would be appreciated.

My goal:

I have a skin where one image is supposed to be a sort of "mask" or overlay of the background, so you can't actually see it. Upon mousing over it for about a second, it changes to a different image that you can definitely see that is contextual to the background. I also want to make it so that when you click the skin it launches Firefox, but I am currently stuck on the image change bit.

Code: Select all


[Rainmeter]
Update=500

[GotALight]

; This sets the starting static image.

Meter=Image
W=35
H=60
ImageName=#@#Images\CigTip.png

; This creates the mouse-over animation.

MouseOverAction=!Execute [!SetOption GotALight ImageName #@#Images\TrailSmoke_Trans_wflame2.png] [!SetOption GotALight W 100] [!SetOption GotALight H 500] [!UpdateMeter GotALight]
MouseLeaveAction=!Execute [!SetOption GotALight ImageName #@#Images\CigTip.png] [!SetOption GotALight W 35] [!SetOption GotALight H 60] [!UpdateMeter GotALight]

Notes: "Cigtip" is the semi-transparent overlay, it blends with the tip of the cigarette in the background (or is supposed to). "TrailSmoke_Trans_wflame2" is the semi-transparent smoke and flame coming from the cigarette, this is what happens when you mouseover the tip. See attached images for example.

Problem: As shown in the attachments, I can either have the tip overlay in the right position or the smoke in the right position. In the screenshot with the tip you can see that it's floating up on the woodsman's hat. I can move it to the right spot, but then the smoke will pop up out of position below.

I know I have to change the Y (I think) position so that the smoke will pop up in the right spot. Thing is... Uh... I dunno how. I've seen other examples of changing the X/Y of an image but it was done for different reasons/purposes so I didn't quite know how to extrapolate that to my situation. Based on what I know of the actual image files themselves, when I resize for the smoke skin, it is stretching out from the top-left corner of the image, but I'm not sure if that helps me to know that I or not.

I hope that makes sense and that I'm not trying to do something that isn't doable!

BONUS POINTS: I also wanted the mouseover to cause an entirely different skin to appear/disappear in tandem. I'm not aware of a command that could "tell" a different skin to do that though. Is such a thing possible?
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5391
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Mouseover Image Change/Resize, X/Y Position Help?

Post by eclectic-tech »

We need the actual images you are trying to combine: TrailSmoke_Trans_wflame2.png and CigTip.png

With those images, someone may be able to help you.
Most of what you want is doable, but without the details, like the skin name you say you want to open, any suggestions would just be guesses.

:: EDIT ::

Here are 2 images I created from your captures; save them in YourSkin\@Resources\Images and use the code below.
Capture_light.png
Capture_light.png
CigTip.png
CigTip.png
I removed the size changes, simply set the image meter to the size you want for both. I added a LeftMouseUpAction that will load another skin; you need to change the parameters to match the config you want to load when the image is left-clicked.

Code: Select all

[Rainmeter]
Update=500

[GotALight]

; This sets the starting static image.

Meter=Image
ImageName=#@#Images\CigTip.png

; This creates the mouse-over animation.

MouseOverAction=[!SetOption GotALight ImageName #@#Images\Capture_light.png][!UpdateMeter GotALight]
MouseLeaveAction=[!SetOption GotALight ImageName #@#Images\CigTip.png][!UpdateMeter GotALight]

LeftMouseUpAction=[!ActivateConfig "YourConfigFolder" "YourSkinIni"]
cig1.gif
You do not have the required permissions to view the files attached to this post.
PutridMeatg
Posts: 2
Joined: December 6th, 2020, 11:30 pm

Re: Mouseover Image Change/Resize, X/Y Position Help?

Post by PutridMeatg »

The simplest solutions are best! Thanks!
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5391
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Mouseover Image Change/Resize, X/Y Position Help?

Post by eclectic-tech »

PutridMeatg wrote: December 7th, 2020, 2:43 pm The simplest solutions are best! Thanks!
Happy to help.
BTW, you can add back the dimension changes on mouseover actions; now that the 2 images are always aligned, the smoke should appear in the right position when enlarged.