It is currently July 18th, 2019, 8:29 pm

how i make my game button change image like "windows 10 start menu live games"

Help with creating, editing & fixing problems with skins
User avatar
Alex MrBison
Posts: 5
Joined: July 1st, 2019, 12:21 pm

how i make my game button change image like "windows 10 start menu live games"

Alex MrBison » July 7th, 2019, 11:17 am

how i make my game button change image like "windows 10 start menu live games"
bandicam 2019-07-07 08-14-41-861.mp4
Games MrBison.rar
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 8376
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: how i make my game button change image like "windows 10 start menu live games"

balala » July 7th, 2019, 2:58 pm

Alex MrBison wrote:
July 7th, 2019, 11:17 am
how i make my game button change image like "windows 10 start menu live games"
You have to use an ActionTimer plugin measure, which allows you to have very quick action taken whenever are you hovering the mouse over the meter.
Unfortunately you can't get this to properly work with Button meters (what you had in your code). I rewrote the existing Button meter as an Image (this is the [Meter] meter) and added a second Image meter, which is sliding when you're hovering the mouse over the skin (this is the [MeterOver] Image meter). A [MeasureSlide] ActionTimer plugin measure was added as well. One of it actions (ActionList1 particularly) is executed when you1re hovering the mouse over the meter, another one (ActionList2) when you're leaving the meter.
To get some similar behavior as a Button meter, I also added a MouseLeaveAction, a LeftMouseDownAction and a LeftMouseUpAction option to the [MeterOver] meter.
In order to get the Image meters to look as they have to, I also split the grid2.png image within the @Resources folder into three images. Each of them is used in the appropriate way on the code. I named the resulting images as grid21.png, grid22.png and respectively grid23.png and have placed them into the same @Resources folder.
I removed all the not needed config existing into you initial root config (Game Button - Copia - Game Button - Copia (12) and Slide) as well as the BANNER.psd file. They are not needed, if you need them for any other reason, please add them back.

And one last remark: the !Execute bang is deprecated and you don't have to use it (you've used it into the ButtonCommand option of the [Meter] meter). Many years ago it had to be used, but in the meantime it was deprecated, so avoid using it.
You do not have the required permissions to view the files attached to this post.
User avatar
Alex MrBison
Posts: 5
Joined: July 1st, 2019, 12:21 pm

Re: how i make my game button change image like "windows 10 start menu live games"

Alex MrBison » July 7th, 2019, 3:16 pm

balala wrote:
July 7th, 2019, 2:58 pm
You have to use an ActionTimer plugin measure, which allows you to have very quick action taken whenever are you hovering the mouse over the meter.
Unfortunately you can't get this to properly work with Button meters (what you had in your code). I rewrote the existing Button meter as an Image (this is the [Meter] meter) and added a second Image meter, which is sliding when you're hovering the mouse over the skin (this is the [MeterOver] Image meter). A [MeasureSlide] ActionTimer plugin measure was added as well. One of it actions (ActionList1 particularly) is executed when you1re hovering the mouse over the meter, another one (ActionList2) when you're leaving the meter.
To get some similar behavior as a Button meter, I also added a MouseLeaveAction, a LeftMouseDownAction and a LeftMouseUpAction option to the [MeterOver] meter.
In order to get the Image meters to look as they have to, I also split the grid2.png image within the @Resources folder into three images. Each of them is used in the appropriate way on the code. I named the resulting images as grid21.png, grid22.png and respectively grid23.png and have placed them into the same @Resources folder.
I removed all the not needed config existing into you initial root config (Game Button - Copia - Game Button - Copia (12) and Slide) as well as the BANNER.psd file. They are not needed, if you need them for any other reason, please add them back.

And one last remark: the !Execute bang is deprecated and you don't have to use it (you've used it into the ButtonCommand option of the [Meter] meter). Many years ago it had to be used, but in the meantime it was deprecated, so avoid using it.
I would like the first image to change like a slide without the mouse interaction.
User avatar
balala
Rainmeter Sage
Posts: 8376
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: how i make my game button change image like "windows 10 start menu live games"

balala » July 7th, 2019, 3:56 pm

Alex MrBison wrote:
July 7th, 2019, 3:16 pm
I would like the first image to change like a slide without the mouse interaction.
So after a preset time? Or when?
User avatar
Alex MrBison
Posts: 5
Joined: July 1st, 2019, 12:21 pm

Re: how i make my game button change image like "windows 10 start menu live games"

Alex MrBison » July 7th, 2019, 5:33 pm

balala wrote:
July 7th, 2019, 3:56 pm
So after a preset time? Or when?
Like this but here is slideshow not button
bandicam 2019-07-07 14-28-28-976.mp4

Code: Select all

[Rainmeter]
Update=3000

[Variables]
ImagePath=#@#Images\
; Define Subfolders (1 = Yes, 0 = NO)
subF=1
; FileFilter
fFilter=*.jpg;*.jpeg;*.png;*.bmp
; Monitor Resolution, example 1152x864 defined "-resize 1152 0"
;MonitorResolution=-ratio -rtype lanczos -resize 1152 0
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

[Slideshow]
Measure=Plugin
Plugin=Plugins\QuotePlugin.dll
PathName=#@#Images\
FileFilter=*.jpg;*.jpeg;*.png
MonitorResolution=-ratio -rtype lanczos -resize 1152 0
Subfolders=#subF#

[Photoslider]
MeasureName=Slideshow
Meter=IMAGE
W=188
H=94
X=0
Y=0
AntiAlias=0
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 8376
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: how i make my game button change image like "windows 10 start menu live games"

balala » July 7th, 2019, 7:31 pm

Alex MrBison wrote:
July 7th, 2019, 5:33 pm
Like this but here is slideshow not button
Maybe this?

Code: Select all

[Rainmeter]
Update=3000
SkinWidth=188
SkinHeight=94

[Variables]
ImagePath=#@#Images
; Define Subfolders (1 = Yes, 0 = NO)
subF=1
; FileFilter
fFilter=*.jpg;*.jpeg;*.png;*.bmp
Y=[Photoslider:H]
U=[!UpdateMeasure "MeasureSlide"][!UpdateMeter "Photoslider"][!UpdateMeter "Photoslider2"][!Redraw]
; Monitor Resolution, example 1152x864 defined "-resize 1152 0"
;MonitorResolution=-ratio -rtype lanczos -resize 1152 0
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

[MeasureUpdate]
Measure=Calc
OnUpdateAction=[!UpdateMeasure "Slideshow"][!CommandMeasure "MeasureSlide" "Execute 1"]

[MeasureSlide]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat Up,25,10
Up=[!SetVariable Y "(Clamp((#Y#-[Photoslider:H]/10),0,[Photoslider:H]))"]#U#
IfCondition=(#Y#=0)
IfTrueAction=[!SetVariable CurrentImage "[Slideshow]"][!SetVariable Y "[Photoslider:H]"]#U#
DynamicVariables=1

[Slideshow]
Measure=Plugin
Plugin=QuotePlugin
PathName=#ImagePath#
FileFilter=*.jpg;*.jpeg;*.png
;MonitorResolution=-ratio -rtype lanczos -resize 1152 0
Subfolders=#subF#
UpdateDivider=-1

[Photoslider]
Meter=IMAGE
ImageName=#CurrentImage#
W=188
H=94
X=0
Y=0
AntiAlias=0
PreserveAspectRatio=1
SolidColor=0,0,0,80
LeftMouseUpAction=["[Slideshow]"]
DynamicVariables=1

[Photoslider2]
MeasureName=Slideshow
Meter=IMAGE
W=188
H=94
X=0
Y=#Y#
AntiAlias=0
PreserveAspectRatio=1
DynamicVariables=1
A second Image meter had to be added. I did this, naming it [Photoslider2]. I also added the possibility to open the currently shown image with a left click (adding a LeftMouseUpAction option to the [Photoslider] meter).
I replaced the Plugin=Plugins\QuotePlugin.dll option of the [Slideshow] measure with the much simpler Plugin=QuotePlugin. That's enough.
Not sure what you intention was with the MonitorResolution option into the [Slideshow] measure, but that definitely doesn't make too much sense. I've commented it out. A similar variable exists in the [Variables] section, but that one was from beginning commented out.
Further improvements might be done. Please check this code and let me know if it look like what you want.
User avatar
Alex MrBison
Posts: 5
Joined: July 1st, 2019, 12:21 pm

Re: how i make my game button change image like "windows 10 start menu live games"

Alex MrBison » July 15th, 2019, 7:09 pm

balala wrote:
July 7th, 2019, 7:31 pm
Maybe this?

Code: Select all

[Rainmeter]
Update=3000
SkinWidth=188
SkinHeight=94

[Variables]
ImagePath=#@#Images
; Define Subfolders (1 = Yes, 0 = NO)
subF=1
; FileFilter
fFilter=*.jpg;*.jpeg;*.png;*.bmp
Y=[Photoslider:H]
U=[!UpdateMeasure "MeasureSlide"][!UpdateMeter "Photoslider"][!UpdateMeter "Photoslider2"][!Redraw]
; Monitor Resolution, example 1152x864 defined "-resize 1152 0"
;MonitorResolution=-ratio -rtype lanczos -resize 1152 0
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

[MeasureUpdate]
Measure=Calc
OnUpdateAction=[!UpdateMeasure "Slideshow"][!CommandMeasure "MeasureSlide" "Execute 1"]

[MeasureSlide]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat Up,25,10
Up=[!SetVariable Y "(Clamp((#Y#-[Photoslider:H]/10),0,[Photoslider:H]))"]#U#
IfCondition=(#Y#=0)
IfTrueAction=[!SetVariable CurrentImage "[Slideshow]"][!SetVariable Y "[Photoslider:H]"]#U#
DynamicVariables=1

[Slideshow]
Measure=Plugin
Plugin=QuotePlugin
PathName=#ImagePath#
FileFilter=*.jpg;*.jpeg;*.png
;MonitorResolution=-ratio -rtype lanczos -resize 1152 0
Subfolders=#subF#
UpdateDivider=-1

[Photoslider]
Meter=IMAGE
ImageName=#CurrentImage#
W=188
H=94
X=0
Y=0
AntiAlias=0
PreserveAspectRatio=1
SolidColor=0,0,0,80
LeftMouseUpAction=["[Slideshow]"]
DynamicVariables=1

[Photoslider2]
MeasureName=Slideshow
Meter=IMAGE
W=188
H=94
X=0
Y=#Y#
AntiAlias=0
PreserveAspectRatio=1
DynamicVariables=1
A second Image meter had to be added. I did this, naming it [Photoslider2]. I also added the possibility to open the currently shown image with a left click (adding a LeftMouseUpAction option to the [Photoslider] meter).
I replaced the Plugin=Plugins\QuotePlugin.dll option of the [Slideshow] measure with the much simpler Plugin=QuotePlugin. That's enough.
Not sure what you intention was with the MonitorResolution option into the [Slideshow] measure, but that definitely doesn't make too much sense. I've commented it out. A similar variable exists in the [Variables] section, but that one was from beginning commented out.
Further improvements might be done. Please check this code and let me know if it look like what you want.

I got it with your help, now just need to adjust the slide show, to be sequential rather than random.
Instead of opening the image with click, I added the command to run the game, this was to look like the icons of the start menu of windows 10.

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

Re: how i make my game button change image like "windows 10 start menu live games"

balala » July 15th, 2019, 7:18 pm

Alex MrBison wrote:
July 15th, 2019, 7:09 pm
I got it with your help, now just need to adjust the slide show, to be sequential rather than random.
Instead of opening the image with click, I added the command to run the game, this was to look like the icons of the start menu of windows 10.
Not easy to be done at all. In fact I don't know a good way to achieve this. Maybe a .lua script file might help, however as I said, it's not easy. Let's see...

Note: as I said, !Execute is a deprecated bang and you should have to get used to avoid using it.