It is currently April 19th, 2024, 4:25 am

Fade Away

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Fade Away

Post by jsmorley »

Yincognito wrote: March 22nd, 2020, 1:46 pm Jsmorley, the last [BUG or NOT] episode I posted in the appropriate section of the forum kind of prevents me to do what I promised for the OP (since I have a centered "Games" skin that reports incorrect #CURRENTCONFIGX# and #CURRENTCONFIGY# on the first load/show). Apart from hardcoding the skin's position or placing it other than centered on the main monitor, is there anything I can do?
Don't know, as I can't follow the problem you are having at all based your explanation, so I'm just carefully ignoring it.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Fade Away

Post by balala »

thesurfinsuricate wrote: March 22nd, 2020, 1:20 pm (Note that i swished names for the two ini the gamepictures is game.ini and the controller icon is called GameLauncher.ini)
First possibility: you have to add one single bang to each MouseOverAction and MouseLeaveAction option. Add the [!SetOption #CURRENTSECTION# ImageAlpha "255"] bang to all MouseOverAction and [!SetOption #CURRENTSECTION# ImageAlpha "204"] to all MouseLeaveAction options.
Additionally note that to can easier check the result, I rewrite a little bit the code, introducing a (let's name it) ImageAlpha variable. This controls the transparency of the images when the mouse is not hovered over them. With such a variable it is much easier to check what's happening when you set a different transparency for the icons (images). If interested add the variable to the [Variables] section:

Code: Select all

[Variables]
ImageAlpha=204
Replace all ImageAlpha options of all meters with ImageAlpha=#ImageAlpha# and finally replace the bangs added to the MouseLeaveAction options with the following ones: [!SetOption #CURRENTSECTION# ImageAlpha "#ImageAlpha#"].
Now if you want to change the transparency to see what's going on when there is set another value for this option, just replace the value of the ImageAlpha variable into the [Variables] section. Play with different values.
If this is not the optimal solution from your point of view, please let me know to refine it a little bit.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Fade Away

Post by jsmorley »

User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Fade Away

Post by jsmorley »

Centering a skin on the screen...

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[!Draggable "0]

[Variables]

[MeasureCenter]
Measure=Calc
Formula=1
DynamicVariables=1
OnUpdateAction=[!Move (#SCREENAREAWIDTH#/2-(#CURRENTCONFIGWIDTH#/2)) (#SCREENAREAHEIGHT#/2-(#CURRENTCONFIGHEIGHT#/2))][!DisableMeasure MeasureCenter]

[MeterImage]
Meter=Image
W=200
H=100
SolidColor=255,255,255,100
User avatar
Yincognito
Rainmeter Sage
Posts: 7125
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Fade Away

Post by Yincognito »

jsmorley wrote: March 22nd, 2020, 1:48 pm Don't know, as I can't follow the problem you are having at all based your explanation, so I'm just carefully ignoring it.
If a skin has the AnchorX, AnchorY, WindowX and WindowY all set to 50% in its Rainmeter.ini section, the #CURRENTCONFIGX# and #CURRENTCONFIGY# incorrectly report the AnchorX and AnchorY values on skin load. If the skin is then refreshed however, the #CURRENTCONFIGX# and #CURRENTCONFIGY# are reported correctly, as WindowX and WindowY.

Even easier to follow: my monitor is 1366x768. For a skin having those 4 values above set to 50% in Rainmeter.ini:
- the #CURRENTCONFIGX# and #CURRENTCONFIGY# reported on load are (incorrectly) 683 and 384, respectively
- on (subsequent) skin refresh, the two variables above (correctly) subtract half of the skin's width and height from 683 and 384, displaying the accurate coordinates

P.S. This problem happens on every skin load, by the way. The skin dimensions don't need to be dynamic for this to happen.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Fade Away

Post by jsmorley »

Yincognito wrote: March 22nd, 2020, 2:04 pm If a skin has the AnchorX, AnchorY, WindowX and WindowY all set to 50% in its Rainmeter.ini section, the #CURRENTCONFIGX# and #CURRENTCONFIGY# incorrectly report the AnchorX and AnchorY values on skin load. If the skin is then refreshed however, the #CURRENTCONFIGX# and #CURRENTCONFIGY# are reported correctly, as WindowX and WindowY.

Even easier to follow: my monitor is 1366x768. For a skin having those 4 values above set to 50% in Rainmeter.ini:
- the #CURRENTCONFIGX# and #CURRENTCONFIGY# reported on load are (incorrectly) 683 and 384, respectively
- on skin refresh, the two variables above (correctly) subtract half of the skin's width and height from 683 and 384, displaying the accurate coordinates
Dunno. I really just don't use the Anchor / Window stuff in Rainmeter.ini.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Fade Away

Post by jsmorley »

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[!Draggable "0]

[Variables]

[MeasureCenter]
Measure=Calc
Formula=1
DynamicVariables=1
OnUpdateAction=[!Move (#SCREENAREAWIDTH#/2-(#CURRENTCONFIGWIDTH#/2)) (#SCREENAREAHEIGHT#/2-(#CURRENTCONFIGHEIGHT#/2))][!DisableMeasure MeasureCenter]

[MeterImage]
Meter=Image
W=200
H=100
SolidColor=255,255,255,100
This assumes the size of the skin is "static". If not, remove the !DisableMeasure.
User avatar
Yincognito
Rainmeter Sage
Posts: 7125
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Fade Away

Post by Yincognito »

jsmorley wrote: March 22nd, 2020, 2:10 pm

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[!Draggable "0]

[Variables]

[MeasureCenter]
Measure=Calc
Formula=1
DynamicVariables=1
OnUpdateAction=[!Move (#SCREENAREAWIDTH#/2-(#CURRENTCONFIGWIDTH#/2)) (#SCREENAREAHEIGHT#/2-(#CURRENTCONFIGHEIGHT#/2))][!DisableMeasure MeasureCenter]

[MeterImage]
Meter=Image
W=200
H=100
SolidColor=255,255,255,100
This assumes the size of the skin is "static". If not, remove the !DisableMeasure.
Moving is easy, the problem is when you need (or rely on) the top X and Y of the skin to do other stuff. Wrong values lead to wrong results. Anyway, thanks for the help - I guess I'll just have to live with it as it is.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
thesurfinsuricate
Posts: 42
Joined: March 20th, 2020, 4:47 pm

Re: Fade Away

Post by thesurfinsuricate »

balala wrote: March 22nd, 2020, 1:49 pm First possibility: you have to add one single bang to each MouseOverAction and MouseLeaveAction option. Add the [!SetOption #CURRENTSECTION# ImageAlpha "255"] bang to all MouseOverAction and [!SetOption #CURRENTSECTION# ImageAlpha "204"] to all MouseLeaveAction options.
Additionally note that to can easier check the result, I rewrite a little bit the code, introducing a (let's name it) ImageAlpha variable. This controls the transparency of the images when the mouse is not hovered over them. With such a variable it is much easier to check what's happening when you set a different transparency for the icons (images). If interested add the variable to the [Variables] section:

Code: Select all

[Variables]
ImageAlpha=204
Replace all ImageAlpha options of all meters with ImageAlpha=#ImageAlpha# and finally replace the bangs added to the MouseLeaveAction options with the following ones: [!SetOption #CURRENTSECTION# ImageAlpha "#ImageAlpha#"].
Now if you want to change the transparency to see what's going on when there is set another value for this option, just replace the value of the ImageAlpha variable into the [Variables] section. Play with different values.
If this is not the optimal solution from your point of view, please let me know to refine it a little bit.
Sorry (I'm a mere mortal) but doesn't that make the icons transparent instead?
(if i lower transparency to much i see the wallpaper through the icons, that was the dilemma. I can live with that of curse)

the [!SetOption #CURRENTSECTION# ImageAlpha "#ImageAlpha#"] tip, nice...
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Fade Away

Post by balala »

thesurfinsuricate wrote: March 22nd, 2020, 2:19 pm Sorry (I'm a mere mortal) but doesn't that make the icons transparent instead?
Not completely. A transparency set to 255 means complet opaque meters. The transparency set to 0 means completely transparent. A value between 0 and 255 means an according transparency.
thesurfinsuricate wrote: March 22nd, 2020, 2:19 pm (if i lower transparency to much i see the wallpaper through the icons, that was the dilemma. I can live with that of curse)
Yep, if you set a transparency for those meters, you'll see the wallpaper through them. But as said, this is not the single possible solution, but it's the easiest one. There are other possibilities as well. Interested?
thesurfinsuricate wrote: March 22nd, 2020, 2:19 pm the [!SetOption #CURRENTSECTION# ImageAlpha "#ImageAlpha#"] tip, nice...
The idea was to have an easy way to check what's happening when you're using different transparencies.