It is currently March 28th, 2024, 7:50 pm

MS-Weather Icons

Weather skins
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

MS-Weather Icons

Post by eclectic-tech »

Created shape meters of 70 MS-Weather Icons converted from SVG icons designed by RNS Icons.

Colored Version Sample Sheet
ms-weathericons-color.png
Monotone Version Sample Sheet
ms-weathericons.png
There are 3 sample skins included:

MS-WeatherIconsColor.ini will display all 70 shapes
  • The metes have a TransformationMatrix formula added, so to resize the icon simply change the value of the "Scale" variable
  • All icons shapes are able to have separate portions each with different colors (no Combined shape meters)
MS-WeatherIconsMonotone.ini will display all 70 shapes
  • The metes have a TransformationMatrix formula added, so to resize the icon simply change the value of the "Scale" variable
  • For "Combine" shapes, change the color by adding a FILL parameter to the first Shape
  • Un-Combined shapes can have individually colored shape sections using the FILL parameter on each Shape# definition
TWCConditions.ini will not display any icons by default
  • Icons shapes match the condition icon code used by TWC
  • Meters are named using the condition icon code number
  • All meters are in a "MSWeather" group, positioned at 0,0 and hidden by default
  • To use in a skin, use this as an @include file to your weather skin and add an OnChangeAction in your weather condition icon measure with "OnChangeAction=[!HideMeterGroup MSWeather][!Showmeter [#CurrentSection#]]" bang to hide all weather icon meters and then show the corresponding weather condition icon meter
Addendum:
V 1.2019.06.13 Added Colored Icons
V 1.2019.06.10 Added a sample weather skin to show use of TWCConditions.ini as an @include file
ms-weathericons-sample.png
Feel free to modify and use any way you need...
You do not have the required permissions to view the files attached to this post.
ms310
Posts: 225
Joined: April 1st, 2015, 7:16 am

Re: MS-Weather Icons

Post by ms310 »

Your skins are brilliant as always. Could you please explain a couple of things for me?

1. #CurrentSection# - this seems like a magic variable to me - where is it "set" and how does it drive the icon selection?
2. @includeicons - this also seems like voodoo for me - how is the icon styled and placed (x,y)?

I realize these are basic questions - thank you for any explanation you are willing to provide. The method you described has me interested. Do you think you will update your other weather skins (I am thinking about the Win10 themed plugin you do) with this method or do you see this more as a proof of concept rather than a general shift in best practice?
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: MS-Weather Icons

Post by eclectic-tech »

ms310 wrote: June 11th, 2019, 4:34 am Your skins are brilliant as always. Could you please explain a couple of things for me?

1. #CurrentSection# - this seems like a magic variable to me - where is it "set" and how does it drive the icon selection?
All the ms-Weather icon meters have a number for their section name; that number corresponds to the condition they represent. In my sample skin code for [measureW9], it will return a number for the current condition. I could have used that actual section name in the bang to show the icon, since it will never change, but I chose to use [#CurrentSection#] (this is the same as if I used [measureW9]). Then I hide all of the ms-weather icons by hiding the group "MSWeather", and show the meter that has the number returned by the measure.

#CurrentSection# is a very useful built-in variable in Rainmeter. It always references the section it is located in, but it's true usefulness is when it is used in a meter style, then it will reference the section that includes that style.

Here is a sample style that can be added to any meter and it will change the corresponding meter text to BOLD style when the the mouse hovers it and back to NORMAL when the mouse leaves; this same style can be added to multiple meters and each will translate #CurrentSection# to the name of the section it is in.

Code: Select all

[StringStyle]
MouseOverAction=[!SetOption #CURRENTSECTION# StringStyle Bold][!UpdateMeter #CURRENTSECTION#][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# StringStyle Normal[!UpdateMeter #CURRENTSECTION#][!Redraw]

[MeterString1]
Meter=String
MeterStyle=StringStyle
StringStyle=Normal
Text=Number 1

[MeterString2]
Meter=String
MeterStyle=StringStyle
StringStyle=Normal
Text=Number 2
ms310 wrote: June 11th, 2019, 4:34 am2. @includeicons - this also seems like voodoo for me - how is the icon styled and placed (x,y)?

I realize these are basic questions - thank you for any explanation you are willing to provide. The method you described has me interested. Do you think you will update your other weather skins (I am thinking about the Win10 themed plugin you do) with this method or do you see this more as a proof of concept rather than a general shift in best practice?
@include... is used to add a separate file with code. It is generally used to include common items that can be used in multiple skins (Variables, styles, etc.). I used it to add the 47+ icon meters to the simple weather skin; without having to copy and paste them into the actual skin. The @include does not position the icons, it simply adds those meters to the skin. The positioning would have to be done in the included file if it is not 0,0.

These shape meters were provided as an alternative to icon images. They should scale to any size desired without distortion. I may use these in future weather skins, but don't plan on modifying any older ones at this time.

Thanks!
E.T.
ms310
Posts: 225
Joined: April 1st, 2015, 7:16 am

Re: MS-Weather Icons

Post by ms310 »

Thank you very much!
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: MS-Weather Icons

Post by eclectic-tech »

V 1.2019.06.13
ms-weathericons-color.png
A new version that allows separately colored portions of the shapes was added to the package in the first post.
You do not have the required permissions to view the files attached to this post.
User avatar
pul53dr1v3r
Posts: 442
Joined: July 30th, 2014, 10:30 am

Re: MS-Weather Icons

Post by pul53dr1v3r »

eclectic-tech wrote: June 13th, 2019, 6:47 pm
Thank you for the effort e-t. :cake:
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: MS-Weather Icons

Post by eclectic-tech »

Pul53dr1v3r wrote: June 13th, 2019, 7:25 pm Thank you for the effort e-t. :cake:
Happy to help get more use of the Shape meter in Rainmeter :great:

Converting SVG images is easier with the convertor skin by theAzack9, but not always successful without some tweaking. :)