Hello,
I would need a little help concerning a personal skin that I would like to put in place on my desk.
I am new to code, and I would like to add a click effect (with another image)
gsrd90 wrote: ↑December 28th, 2021, 8:56 am
Hello,
I would need a little help concerning a personal skin that I would like to put in place on my desk.
I am new to code, and I would like to add a click effect (with another image)
Yep, Button meter is a good option, however it has the disadvantage of having to create the proper image, used by the meter. Definitely can be done, but not sure it worth. And additionally OP has already started to work with an Image meter, so...
However if there is needed, here is a description on how to create the image.
gsrd90 wrote: ↑December 28th, 2021, 8:56 am
Hello,
I would need a little help concerning a personal skin that I would like to put in place on my desk.
I am new to code, and I would like to add a click effect (with another image)
no click >
click >
What is the line of code to add to do this?
Try to add the following LeftMouseDownAction option and modify the already posted LeftMouseUpAction to the following ones:
Note here that reddit.png is the "not clicked" image, while reddit2.png is the clicked one. Modify the names accordingly if you're using other names.
Two additional recommendations here:
Even if a while ago (in fact many years ago), the !Execute bang had to be used, in meantime it has been deprecated, so there is no need to use it anymore. I removed it from the above option.
The best place for all resources used by a skin is the @Resources folder. It is a good idea to put all such resources (like images) there. Accordingly if you move the images (reddit.png and reddit2.png or whatever) to this folder, add the #@# variable identifier in front of every image name. For instance the ImageName option of the [Button] meter has to be modified a little bit as well as the LeftMouseDownAction and LeftMouseUpAction options. For instance this way:
Note the #@# identifiers in every place where images are named. Just take care to move the images accordingly, if you're using this approach (which I definitely recommend).
gsrd90 wrote: ↑December 28th, 2021, 8:56 am
Hello,
I would need a little help concerning a personal skin that I would like to put in place on my desk.
I am new to code, and I would like to add a click effect (with another image)
Umm, you want to rotate or flip the image? Or change the way it shines... For the later you gotta need two images you yourself edited, cause Rainmeter can't achieve that. For the first, it's easy.
[MeterRedditButton]
Meter=Image
ImageName=reddit.png
ImageRotate=0
; For flip you can use ImageFlip and change between None and Vertical
LeftMouseDownAction=[!SetOption MeterRedditButton ImageRotate 180][!UpdateMeter MeterRedditButton][!Redraw]
LeftMouseUpAction=[!SetOption MeterRedditButton ImageRotate 0][!UpdateMeter MeterRedditButton][!Redraw]["https://reddit.com/"]
Change shine direction: Requirements:Two images with opposite shine directions
balala wrote: ↑December 28th, 2021, 12:52 pm
Yep, Button meter is a good option, however it has the disadvantage of having to create the proper image, used by the meter. Definitely can be done, but not sure it worth. And additionally OP has already started to work with an Image meter, so...
Yeah, you are probably right. OP does not need to change direction, that is just a good back pocket idea.
the DA GALLERYFor some Reason, the square root of X2 does not involve X
[MeterRedditButton]
Meter=Image
ImageName=reddit.png
ImageRotate=0
; For flip you can use ImageFlip and change between None and Vertical
LeftMouseDownAction=[!SetOption MeterRedditButton ImageRotate 180][!UpdateMeter MeterRedditButton][!Redraw]
LeftMouseUpAction=[!SetOption MeterRedditButton ImageRotate 0][!UpdateMeter MeterRedditButton][!Redraw]["https://reddit.com/"]
I think this is a good solution.
the DA GALLERYFor some Reason, the square root of X2 does not involve X