It is currently August 10th, 2022, 1:18 am

Showing more info on weather skins

Get help with creating, editing & fixing problems with skins
User avatar
Yincognito
Rainmeter Sage
Posts: 4778
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Showing more info on weather skins

Post by Yincognito »

TallShultzy wrote: July 1st, 2020, 10:19 pm Jsmorley, I've altered your skin to show slidein/out extra info when mouse over "tomorrow". I think it looks ok, but adds nearly 350 extra lines of code just for the day.
Personally, I would have sticked with the replace method you posted earlier, there are plenty of fields that you can replace the missing today fields with - it just looks much more efficient. BUT... since jsmorley's suggestion is much more appealing visually and you decided to implement it, I do have a couple of small observations to make, from a "technical" point of view (if you care about it, that is):
- way too many redraw bangs there; unless I'm missing something, you don't need to redraw after every other freaking bang, that's just going to waste resources needlessly, not to mention being redundant and without a functional purpose; one redraw after a visually related group of bangs is enough
- the rows from Feels Like to Sunset don't have the same Y coordinates as the today's rows, meaning that the difference in row spacing when sliding is noticeable
- I would have personally placed the tomorrow meters to the right of the today's meters (i.e. outside of the container's frame, visually), added the today meters to the container, then instead of sliding "in" and "out" tomorrow, I would have slid the today + tomorrow combo to the "left" to show tomorrow and slid to the "right" to show back today again ... without changing colors or hiding any meters whatsoever
- I'm not sure the visible container meter and the bang there have any purpose; if it's in an example in the manual doesn't mean that it should be in every code of every skin out there, if it's not needed by the said skin
- I have no idea why you change the colors of the today meters if they are going to be replaced with the tomorrow meters sliding in anyway
- the today temperature and condition text remains visible when sliding in the set of tomorrow meters; is it intentional or ... cause IMHO this particular behavior doesn't look that well

That being said, everything works ok and it's more than enough for a first attempt at this. If you're happy with it, no reason to change it, so don't take the above as criticizing or a suggestion that you should do things differently - these are merely suggestions on improvement, that you don't have to follow if you don't want to. ;-)
User avatar
Yincognito
Rainmeter Sage
Posts: 4778
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Showing more info on weather skins

Post by Yincognito »

TallShultzy wrote: July 1st, 2020, 10:19 pmJsmorley, I've altered your skin to show slidein/out extra info when mouse over "tomorrow". I think it looks ok, but adds nearly 350 extra lines of code just for the day.
Yincognito wrote: July 2nd, 2020, 1:19 am[...] BUT... since jsmorley's suggestion is much more appealing visually and you decided to implement it, I do have a couple of small observations to make, from a "technical" point of view (if you care about it, that is) [...]
And here is how I would envision the implementation, based on the observations I made above...

Adding these to the Skin Labels paragraph of WeatherComJSONLanguage.inc from the @Resources folder, so that we're in line with how jsmorley structured his skin:

Code: Select all

CloudPercent=Cloud Cover
PrecipitationPercent=Prec. Pct.
PrecipitationType=Prec. Type
Then the "replacement" / appropriate variant of Weather.com.ini, let's call it TestWeather.comX.ini:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
SkinWidth=170
SkinHeight=323
BackGroundMode=2
SolidColor=255,0,0,0
MouseScrollDownAction=[!Refresh #CURRENTCONFIG#]
RightMouseUpAction=[!SkinCustomMenu]
ContextTitle=[@LocationName], [@LocationAdminDistrict], [@LocationCountry]
ContextAction=https://www.google.com/maps/search/[@LocationLatitude],[@LocationLongitude]
ContextTitle2=[@CurrentObservationDate]
ContextAction2=[]
ContextTitle3=#ObservedAt# [@CurrentObservationTime] [@LocationTimeZoneAbbreviation]
ContextAction3=[]
ContextTitle4=----
ContextAction4=[]
ContextTitle5=#ChooseLocation#
ContextAction5=[!ActivateConfig "#CURRENTCONFIG#\WeatherComCodes" "WeatherComCodes.ini"]
ContextTitle6=----
ContextAction6=[]
ContextTitle7=#EditLanguageVariables#
ContextAction7=["#@#\WeatherComJSONVariables.inc"]["https://admin.rainmeter.net/LanguageCodes.php"]
ContextTitle8=#EditTranslationVariables#
ContextAction8=["#@#\WeatherComJSONLanguage.inc"]
ContextTitle9=#EditGeneralVariables#
ContextAction9=["#@#\GeneralVariables.inc"]
ContextTitle10=----
ContextAction10=[]
ContextTitle11=#Open@ResourcesFolder#
ContextAction11=["#@#"]
ContextTitle12=----
ContextAction12=[]
ContextTitle13=#MoreActions#
ContextAction13=[!SkinMenu]

[Metadata]
Name=WeatherComJSON
Author=JSMorley | OnyxBlack, Xenium, SilverAzide
; The parsing of the weather.com website in the various @Inlcude .inc files is a collaborative effort of:
; OnyxBlack, Xenium, SilverAzide and myself. All credit to these authors. Thanks!
Information=Uses the Weather.com website V3 JSON data to provide weather information.| - Right-click and select "Choose Location" to set your Location Code. | - Right-click and select "Edit Lanquage Variables" to edit language and date/time defaults. | - Right-click and select "Edit Translation Variables" to translate skin and context menu labels to your language.
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Version=June 5, 2020

[Variables]
@Include1=#@#GeneralVariables.inc
@Include2=#@#WeatherComJSONVariables.inc
@Include3=#@#WeatherComJSONMeasures.inc
@Include4=#@#WeatherComJSONLanguage.inc
Red=255,0,0,0
PopOutColor=255,128,0,255
Offset=0
U=[!UpdateMeasure "MeasureSlideInOut"][!UpdateMeter *][!Redraw]
; This skin doesn't use these
; They are here so you can see them in About / Skins

;@Include5=#@#WeatherComJSONAlerts.inc
;@Include6=#@#WeatherComJSONMoon.inc

[MeterAllBackground2]
Meter=Shape
Shape=Rectangle 0.5,0.5,169,110,12 | Fill Color #BackgroundColor# | StrokeWidth 1.5 | Stroke Color #FrameColor#
Y=208
W=170
H=125

[MeterContainerVisible]
Meter=Shape
Shape=Rectangle 0.5,0.5,169,206,12 | Fill Color #BackgroundColor# | StrokeWidth 1.5 | Stroke Color #FrameColor#
X=0
Y=0
W=170
H=213

[MeterContainer]
Meter=Shape
; Meters used as a container will not be drawn. They are used as a "mask".
; Create a copy of them, as above, to make them visible.
Shape=Rectangle 0.5,0.5,160,206,12| Fill Color #BackgroundColor1# | StrokeWidth 1.5 | Stroke Color #FrameColor#
X=r
Y=r
W=170
H=213

[MeasureSlideInOut]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat SlideIn, 60, 12 | Wait 10
SlideIn=[!SetVariable OffSet "(Clamp(#OffSet#-15,-165,0))"]#U#
ActionList2=Repeat SlideOut, 60, 12  | Wait 10
SlideOut=[!SetVariable OffSet "(Clamp(#OffSet#+15,-165,0))"]#U#
IgnoreWarnings=1
DynamicVariables=1

; =======================================
; Overide / Modifiy Measures
; =======================================

[MeasureToggleAtNight]
Measure=String
Group=Weather
String=[@ForecastTodayDayTemperature]
DynamicVariables=1
IfMatch=^$
IfMatchAction=[!SetOption MeterTodayIcon MeasureName "@ForecastTodayNightIcon"][!SetOption MeterTodayName MeasureName "@ForecastTodayNightPart"][!SetOption MeterTodayHighLow MeasureName "@CurrentTemperatureMaxSince7AM"][!SetOption MeterTodayPrecipitation MeasureName "@ForecastTodayNightPrecipitationPercent"][!SetOption MeterTodayHighLow InlineSetting "Color | 160,160,160,255"]
IfNotMatchAction=[!SetOption MeterTodayIcon MeasureName "@ForecastTodayDayIcon"][!SetOption MeterTodayName MeasureName "@ForecastTodayDayPart"][!SetOption MeterTodayHighLow MeasureName "@ForecastTodayDayTemperature"][!SetOption MeterTodayPrecipitation MeasureName "@ForecastTodayDayPrecipitationPercent"][!SetOption MeterTodayHighLow InlineSetting "None"]

[MeasureWindCalm]
Measure=Calc
Formula=[@CurrentWindSpeed]
DynamicVariables=1
IfCondition=MeasureWindCalm = 0
IfTrueAction=[!SetOption MeterCurrentWind Text "#Calm#"]
IfFalseAction=[!SetOption MeterCurrentWind Text "%1 %2"]

; Alerts are a number from 4 (low-informational) to 1 (high-severe)
; I am not reacting to level 4 alerts, but you can if you want.

[MeasureAlerts]
Measure=String
String=[@EntireSiteSuperParent]
DynamicVariables=1
IfMatch="severityCode":
IfNotMatchAction=[!HideMeter MeterAlert][!SetOption MeterAlert ImageName ""]
IfMatch2="severityCode":4
IfMatchAction2=[!HideMeter MeterAlert][!SetOption MeterAlert ImageName ""]
;IfMatchAction2=[!SetOption MeterAlert ImageName "4.png"][!ShowMeter MeterAlert]
IfMatch3="severityCode":3
IfMatchAction3=[!SetOption MeterAlert ImageName "3.png"][!ShowMeter MeterAlert]
IfMatch4="severityCode":2
IfMatchAction4=[!SetOption MeterAlert ImageName "2.png"][!ShowMeter MeterAlert]
IfMatch5="severityCode":1
IfMatchAction5=[!SetOption MeterAlert ImageName "1.png"][!ShowMeter MeterAlert]


; =======================================
; Meters
; =======================================

[MeterCurrentIcon]
Meter=Image
Group=Meters
MeasureName=@CurrentIcon
W=135
X=(#Offset#+5)
Y=-8
ImagePath=#ImagePath#\RealisticIcons
PreserveAspectRatio=1
ImageAlpha=#IconAlpha#
AntiAlias=1
LeftMouseUpAction=["#URLSite#"]
MouseOverAction=[!SetOption MeterCurrentIcon ImageAlpha 255][!UpdateMeter MeterCurrentIcon][!Redraw]
MouseLeaveAction=[!SetOption MeterCurrentIcon ImageAlpha #IconAlpha#][!UpdateMeter MeterCurrentIcon][!Redraw]
DynamicVariables=1
Container=MeterContainer

[MeterAlert]
Meter=Image
X=(#Offset#+10)
Y=7
W=30
H=30
ImagePath=#ImagePath#\Alerts
LeftMouseUpAction=["#URLSite#"]
ToolTipType=1
ToolTipTitle=#AlertsTipTitle#
ToolTipText=#AlertsTipText#
Hidden=1
DynamicVariables=1
Container=MeterContainer

[MeterCurrentTemp]
Meter=String
Group=Meters
MeasureName=@CurrentTemperature
MeasureName2=@UnitsTemperature
X=(#Offset#+154)
Y=3
FontFace=#TextFont#
FontSize=34
FontWeight=300
FontColor=#ValueColor#
StringCase=Upper
StringAlign=Right
AntiAlias=1
Text=%1#Degrees#%2
DynamicVariables=1
Container=MeterContainer

[MeterCurrentConditions]
Meter=String
Group=Meters
MeasureName=@CurrentConditions
X=(#Offset#+154)
Y=-8R
W=142
H=20
FontFace=#TextFont#
FontSize=13
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
AntiAlias=1
ClipString=1
DynamicVariables=1
Container=MeterContainer

[MeterFeelsLikeLabel]
Meter=String
Group=Meters
X=(#Offset#+15)
Y=3R
W=160
H=15
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
AntiAlias=1
ClipString=1
Text=#FeelsLike#
DynamicVariables=1
Container=MeterContainer

[MeterFeelsLike]
Meter=String
Group=Meters
MeasureName=@CurrentFeelsLike
X=(#Offset#+154)
Y=0r
W=160
H=15
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
AntiAlias=1
ClipString=1
Text=%1#Degrees#
DynamicVariables=1
Container=MeterContainer

[MeterHumidityLabel]
Meter=String
Group=Meters
X=(#Offset#+15)
Y=2R
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
AntiAlias=1
ClipString=1
Text=#Humidity#
DynamicVariables=1
Container=MeterContainer

[MeterHumidity]
Meter=String
Group=Meters
MeasureName=@CurrentHumidity
X=(#Offset#+154)
Y=0r
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
AntiAlias=1
ClipString=1
Text=%1%
DynamicVariables=1
Container=MeterContainer

[MeterWindLabel]
Meter=String
Group=Meters
X=(#Offset#+15)
Y=2R
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
AntiAlias=1
Text=#Wind#
DynamicVariables=1
Container=MeterContainer

[MeterCurrentWind]
Meter=String
Group=Meters
MeasureName=@CurrentWindSpeed
MeasureName2=@UnitsSpeed
X=(#Offset#+154)
Y=0r
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
AntiAlias=1
ClipString=1
DynamicVariables=1
Container=MeterContainer

[MeterPressureLabel]
Meter=String
Group=Meters
MeasureName=@CurrentPressureText
X=(#Offset#+15)
Y=2R
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
AntiAlias=1
ClipString=1
Text=#Pressure#
DynamicVariables=1
Container=MeterContainer

[MeterCurrentPressure]
Meter=String
Group=Meters
MeasureName=@CurrentPressure
MeasureName2=@UnitsPressure
X=(#Offset#+154)
Y=0r
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
AntiAlias=1
ClipString=1
Text=%1 %2
DynamicVariables=1
Container=MeterContainer

[MeterChangeLabel]
Meter=String
Group=Meters
X=(#Offset#+15)
Y=2R
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
AntiAlias=1
ClipString=1
Text=#Change#
DynamicVariables=1
Container=MeterContainer

[MeterCurrentChange]
Meter=String
Group=Meters
MeasureName=@CurrentPressureChangeTrend
X=(#Offset#+154)
Y=0r
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
StringCase=Proper
AntiAlias=1
ClipString=1
DynamicVariables=1
Container=MeterContainer

[MeterSunRiseLabel]
Meter=String
Group=Meters
X=(#Offset#+15)
Y=2R
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
AntiAlias=1
ClipString=1
StringCase=Proper
Text=#Sunrise#
DynamicVariables=1
Container=MeterContainer

[MeterSunRise]
Meter=String
Group=Meters
MeasureName=@CurrentSunriseTime
X=(#Offset#+154)
Y=0r
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringCase=Lower
StringAlign=Right
AntiAlias=1
ClipString=1
Text=%1
DynamicVariables=1
Container=MeterContainer

[MeterSunsetLabel]
Meter=String
Group=Meters
X=(#Offset#+15)
Y=2R
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
AntiAlias=1
ClipString=1
StringCase=Proper
Text=#Sunset#
DynamicVariables=1
Container=MeterContainer

[MeterSunSet]
Meter=String
Group=Meters
MeasureName=@CurrentSunsetTime
X=(#Offset#+154)
Y=0r
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringCase=Lower
StringAlign=Right
AntiAlias=1
ClipString=1
Text=%1
DynamicVariables=1
Container=MeterContainer

[MeterTodayIcon]
Meter=Image
Group=Meters
W=60
X=13
Y=205
ImagePath=#ImagePath#\RealisticIcons
PreserveAspectRatio=1
AntiAlias=1
DynamicVariables=1

[MeterTodayName]
Meter=String
Group=Meters
X=154
Y=6r
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
StringAlign=Right
AntiAlias=1

[MeterTodayHighLow]
Meter=String
Group=Meters
MeasureName2=@ForeCastTodayNightTemperature
X=154
Y=16r
W=135
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
AntiAlias=1
InlinePattern=^(.*) \| .*
Text=%1#Degrees# | %2#Degrees#

[MeterTodayPrecipitationLabel]
Meter=String
Group=Meters
X=116
Y=-2R
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
StringAlign=Right
AntiAlias=1
ClipString=1
Text=↓↓

[MeterTodayPrecipitation]
Meter=String
Group=Meters
MeasureName=@ForecastDay1PrecipitationPercent
X=154
Y=0r
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
AntiAlias=1
ClipString=1
Text=%1%

[MeterTomorrowIcon]
Meter=Image
Group=Meters
MeasureName=@ForecastDay2DayIcon
W=60
X=13
Y=17r
ImagePath=#ImagePath#\RealisticIcons
PreserveAspectRatio=1
AntiAlias=1
DynamicVariables=1

[MeterTomorrowName]
Meter=String
Group=Meters
MeasureName=@ForecastDay2DayLong
X=154
Y=8r
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
StringAlign=Right
AntiAlias=1
MouseOverAction=[!CommandMeasure MeasureSlideInOut "Stop 2"][!CommandMeasure MeasureSlideInOut "Execute 1"]
MouseLeaveAction=[!CommandMeasure MeasureSlideInOut "Stop 1"][!CommandMeasure MeasureSlideInOut "Execute 2"]

[MeterTomorrowHighLow]
Meter=String
Group=Meters
MeasureName=@ForecastDay2DayTemperature
MeasureName2=@ForecastDay2NightTemperature
X=154
Y=16r
W=135
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
AntiAlias=1
Text=%1#Degrees# | %2#Degrees#

[MeterTomorrowPrecipitationLabel]
Meter=String
Group=Meters
X=116
Y=-2R
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
StringAlign=Right
AntiAlias=1
ClipString=1
Text=↓↓

[MeterTomorrowPrecipitation]
Meter=String
Group=Meters
MeasureName=@ForecastDay2DayPrecipitationPercent
X=154
Y=0r
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
AntiAlias=1
ClipString=1
Text=%1%

[MeterForecastDay2DayIcon]
Meter=Image
Group=Meters
MeasureName=@ForecastDay2DayIcon
W=135
X=(165+#Offset#+5)
Y=-8
ImagePath=#ImagePath#\RealisticIcons
PreserveAspectRatio=1
ImageAlpha=#IconAlpha#
AntiAlias=1
DynamicVariables=1
Container=MeterContainer

[MeterForecastDay2DayTemp]
Meter=String
Group=Meters
MeasureName=@ForecastDay2DayTemperature
MeasureName2=@UnitsTemperature
X=(165+#Offset#+154)
Y=3
FontFace=#TextFont#
FontSize=34
FontWeight=300
FontColor=#ValueColor#
StringCase=Upper
StringAlign=Right
AntiAlias=1
Text=%1#Degrees#%2
DynamicVariables=1
Container=MeterContainer

[MeterForecastDay2DayConditions]
Meter=String
Group=Meters
MeasureName=@ForecastDay2DayConditions
X=(165+#Offset#+154)
Y=-8R
W=142
H=20
FontFace=#TextFont#
FontSize=13
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
AntiAlias=1
ClipString=1
DynamicVariables=1
Container=MeterContainer

[MeterForecastDay2DayCloudPercentLabel]
Meter=String
Group=Meters
X=(165+#Offset#+15)
Y=3R
W=160
H=15
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
AntiAlias=1
ClipString=1
Text=#CloudPercent#
DynamicVariables=1
Container=MeterContainer

[MeterForecastDay2DayCloudPercent]
Meter=String
Group=Meters
MeasureName=@ForecastDay2DayCloudPercent
X=(165+#Offset#+154)
Y=0r
W=160
H=15
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
AntiAlias=1
ClipString=1
Text=%1%
DynamicVariables=1
Container=MeterContainer

[MeterForecastDay2DayHumidityLabel]
Meter=String
Group=Meters
X=(165+#Offset#+15)
Y=2R
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
AntiAlias=1
ClipString=1
Text=#Humidity#
DynamicVariables=1
Container=MeterContainer

[MeterForecastDay2DayHumidity]
Meter=String
Group=Meters
MeasureName=@ForecastDay2DayHumidity
X=(165+#Offset#+154)
Y=0r
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
AntiAlias=1
ClipString=1
Text=%1%
DynamicVariables=1
Container=MeterContainer

[MeterForecastDay2DayWindLabel]
Meter=String
Group=Meters
X=(165+#Offset#+15)
Y=2R
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
AntiAlias=1
Text=#Wind#
DynamicVariables=1
Container=MeterContainer

[MeterForecastDay2DayWind]
Meter=String
Group=Meters
MeasureName=@ForecastDay2DayWindSpeed
MeasureName2=@UnitsSpeed
X=(165+#Offset#+154)
Y=0r
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
AntiAlias=1
ClipString=1
Text=%1 %2
DynamicVariables=1
Container=MeterContainer

[MeterForecastDay2DayPrecipitationPercentLabel]
Meter=String
Group=Meters
X=(165+#Offset#+15)
Y=2R
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
AntiAlias=1
ClipString=1
Text=#PrecipitationPercent#
DynamicVariables=1
Container=MeterContainer

[MeterForecastDay2DayPrecipitationPercent]
Meter=String
Group=Meters
MeasureName=@ForecastDay2DayPrecipitationPercent
X=(165+#Offset#+154)
Y=0r
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
AntiAlias=1
ClipString=1
Text=%1%
DynamicVariables=1
Container=MeterContainer

[MeterForecastDay2DayPrecipitationTypeLabel]
Meter=String
Group=Meters
X=(165+#Offset#+15)
Y=2R
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
AntiAlias=1
ClipString=1
Text=#PrecipitationType#
DynamicVariables=1
Container=MeterContainer

[MeterForecastDay2DayPrecipitationType]
Meter=String
Group=Meters
MeasureName=@ForecastDay2DayPrecipitationType
X=(165+#Offset#+154)
Y=0r
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringAlign=Right
StringCase=Proper
AntiAlias=1
ClipString=1
Text=%1
DynamicVariables=1
Container=MeterContainer

[MeterForecastDay2SunRiseLabel]
Meter=String
Group=Meters
X=(165+#Offset#+15)
Y=2R
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
AntiAlias=1
ClipString=1
StringCase=Proper
Text=#Sunrise#
DynamicVariables=1
Container=MeterContainer

[MeterForecastDay2SunRise]
Meter=String
Group=Meters
MeasureName=@ForecastDay2SunriseTime
X=(165+#Offset#+154)
Y=0r
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringCase=Lower
StringAlign=Right
AntiAlias=1
ClipString=1
Text=%1
DynamicVariables=1
Container=MeterContainer

[MeterForecastDay2SunsetLabel]
Meter=String
Group=Meters
X=(165+#Offset#+15)
Y=2R
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#LabelColor#
AntiAlias=1
ClipString=1
StringCase=Proper
Text=#Sunset#
DynamicVariables=1
Container=MeterContainer

[MeterForecastDay2SunSet]
Meter=String
Group=Meters
MeasureName=@ForecastDay2SunsetTime
X=(165+#Offset#+154)
Y=0r
W=160
H=17
FontFace=#TextFont#
FontSize=11
FontWeight=400
FontColor=#ValueColor#
StringCase=Lower
StringAlign=Right
AntiAlias=1
ClipString=1
Text=%1
DynamicVariables=1
Container=MeterContainer
Result:
ezgif.com-optimize.gif
One can, of course, change the 3 tomorrow fields (and their labels) that I used to replace the corresponding non-existent today fields, in the WeatherComJSONLanguage.inc file and the appropriate meters from this Weather.com.ini variant / replacement. Here I just used the same fields I'm using in my skins to replace the current observation fields, as I didn't have to think it through again.

If it were me, I'd make all the 30 day / night part cycles available to slide in the container on mouse scroll, reusing the meters by setting their options dynamically when the day / night part changes (thus not having to create additional meters like you did), since, apart from the slide effect, I approach this the same way in my skins. But then again, that's just me, others do things differently and like to work 10 times more on it... :confused:
You do not have the required permissions to view the files attached to this post.
TallShultzy
Posts: 62
Joined: March 30th, 2016, 5:02 pm

Re: Showing more info on weather skins

Post by TallShultzy »

Yincognito, thanks very much for your comments. Good or bad they are always information to learn from. If you remember I started with the "tooltip" idea, progressed with the replacement idea and then went on to the slidein/out version.

This is only my second attempt to program in Rainmeter so it took a long time to understand the concept of the "out of view" container and the slidein/out code. I always thought there was something wrong with the mouseover coding but I don't have enough experience.

I changed the colours of the tomorrow meters to be the same as the "tomorrow" colour so it would be an indication (on a 7 or 15 day skins) as to which info was shown.

I need to go over your code to see how/why my Mousover commands are redundant and to understand how the today + tomorrow combo works and then try it for two days.

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

Re: Showing more info on weather skins

Post by jsmorley »

TallShultzy wrote: July 2nd, 2020, 1:15 pm Yincognito, thanks very much for your comments. Good or bad they are always information to learn from. If you remember I started with the "tooltip" idea, progressed with the replacement idea and then went on to the slidein/out version.

This is only my second attempt to program in Rainmeter so it took a long time to understand the concept of the "out of view" container and the slidein/out code. I always thought there was something wrong with the mouseover coding but I don't have enough experience.

I changed the colours of the tomorrow meters to be the same as the "tomorrow" colour so it would be an indication (on a 7 or 15 day skins) as to which info was shown.

I need to go over your code to see how/why my Mousover commands are redundant and to understand how the today + tomorrow combo works and then try it for two days.

Thanks again.

You are making great progress! Stay at it...
User avatar
Yincognito
Rainmeter Sage
Posts: 4778
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Showing more info on weather skins

Post by Yincognito »

TallShultzy wrote: July 2nd, 2020, 1:15 pm Yincognito, thanks very much for your comments. Good or bad they are always information to learn from. If you remember I started with the "tooltip" idea, progressed with the replacement idea and then went on to the slidein/out version.

This is only my second attempt to program in Rainmeter so it took a long time to understand the concept of the "out of view" container and the slidein/out code. I always thought there was something wrong with the mouseover coding but I don't have enough experience.

I changed the colours of the tomorrow meters to be the same as the "tomorrow" colour so it would be an indication (on a 7 or 15 day skins) as to which info was shown.

I need to go over your code to see how/why my Mousover commands are redundant and to understand how the today + tomorrow combo works and then try it for two days.

Thanks again.
No problem - learning and trying things by yourself can only lead to positive results. :thumbup:
jsmorley wrote: July 2nd, 2020, 1:17 pmYou are making great progress! Stay at it...
I fully subscribe to that statement - thing always go in the right direction if one is willing to understand what happens. :great:
User avatar
Yincognito
Rainmeter Sage
Posts: 4778
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Showing more info on weather skins

Post by Yincognito »

TallShultzy wrote: July 2nd, 2020, 1:15 pmI changed the colours of the tomorrow meters to be the same as the "tomorrow" colour so it would be an indication (on a 7 or 15 day skins) as to which info was shown.
Oh, I see. Then you can continue with this approach, no worries. You can easily revert to this effect in my version as well, by replacing the FontColor=#ValueColor# with FontColor=#PopOutColor# in all the forecast String meters, as I didn't remove any variable from your code. No need to update meters for that, by the way, and you can do it automatically using the Replace choice from either Notepad or Notepad++ menu.
TallShultzy wrote: July 2nd, 2020, 1:15 pmI need to go over your code to see how/why my Mousover commands are redundant and to understand how the today + tomorrow combo works and then try it for two days.
If you don't understand something, ask. The combo works simply because all the today+tomorrow meters (i.e. not just the today ones) are included in the container. Had to do some X adjustments (and one Y adjustment in [MeterTodayIcon], as the relative positioning changed after adding previous meters to the container) for this to work, but it wasn't difficult at all (just a bit lenghty due to the number of meters). It was more a matter of copy pasting meters from today to tomorrow and modifying some lines, really.

Yeah, both the meter updates, the change of colors and the many redraws were redundant in your version of MouseOver commands. The change of colors for the tomorrow meters can be done as above instead of doing it dynamically like you did, and the meter updates and redraw happen anyway on every slide since they are included in the U variable which is parsed and "executed" in the slide action list (so no need to add a bunch of them again in the MouseOver/Leave options).
TallShultzy
Posts: 62
Joined: March 30th, 2016, 5:02 pm

Re: Showing more info on weather skins

Post by TallShultzy »

Thanks Yincognito it all makes sense now.

"If you don't understand something, ask." Ok but in order to get the right answer you have to ask the right question :)
User avatar
Yincognito
Rainmeter Sage
Posts: 4778
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Showing more info on weather skins

Post by Yincognito »

TallShultzy wrote: July 2nd, 2020, 2:37 pm"If you don't understand something, ask." Ok but in order to get the right answer you have to ask the right question :)
Haha, something like that, yes. But me personally, I can read very well between the lines (and I'm sure other folks here can do the same), so that's not a real problem. Just say "help..." and we'll jump in in no time, you don't even have to say what was the question about... :rofl:
TallShultzy
Posts: 62
Joined: March 30th, 2016, 5:02 pm

Re: Showing more info on weather skins

Post by TallShultzy »

Before I ask for help two "incidence" which took a while to solve.
1 - the "↓" came out as a hieroglyph, your encoding was set to UTF-8 mine are UCF-2 LE BOM
2 - an errant mouse click set the "click-through" to active thus rendering the slidein/out inoperative

Anyway what I wanted to ask before I extend it to the 7 day version is:
if I create a [MeterContainer2] with the same info as [MeterContainer] then replicate the current meters and the day 3 meters into this new container, is this the way to go?

Or create one for current meters and one for each other day and move them together?
User avatar
Yincognito
Rainmeter Sage
Posts: 4778
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Showing more info on weather skins

Post by Yincognito »

TallShultzy wrote: July 2nd, 2020, 5:02 pm Before I ask for help two "incidence" which took a while to solve.
1 - the "↓" came out as a hieroglyph, your encoding was set to UTF-8 mine are UCF-2 LE BOM
2 - an errant mouse click set the "click-through" to active thus rendering the slidein/out inoperative

Anyway what I wanted to ask before I extend it to the 7 day version is:
if I create a [MeterContainer2] with the same info as [MeterContainer] then replicate the current meters and the day 3 meters into this new container, is this the way to go?

Or create one for current meters and one for each other day and move them together?
1 - My encodings in skins I work on are always UCS2-LE BOM, since I extensively use Unicode characters in all of my skins and beyond. I just checked the encoding of my local version of the code as we speak (I didn't checked it before, as everything was working fine) and it's set to UCS2-LE BOM alright, so this issue wasn't from my end, really. Not to mention that if it was, you'd have seen those hieroglyphs in the preview GIF I posted next to the code, which obviously wasn't the case. I think it has to do with how you saved the copied code from the forum in the new Notepad (not sure if it's true for Notepad++ too) text file. It's easy to overlook these details and make sure the encoding is properly set before editing the file further.
2 - Yeah, those errant mouse clicks happen for everyone once in a while, and if you're not paying attention you're left wondering why the heck stuff isn't working. Hopefully you didn't waste too much time until you identified the (otherwise, logical) problem.

Creating a ton of containers, plus current and additional meters into it is not really the way to go, especially since you can do it much easier. For example, assuming you have a place to hover to show, say, the day 2 night temperature (could be any day, day part, or field here - I just use this as an example), you only have to dynamically set the MeasureName option in the corresponding meter accordingly, before the slide in happens, like having this in the hovered meter's options (notice the first bang below, that's everything you need, really):

Code: Select all

MouseOverAction=[!SetOption MeterForecastDay2DayTemp MeasureName "@ForecastDay2NightTemperature"][!CommandMeasure MeasureSlideInOut "Stop 2"][!CommandMeasure MeasureSlideInOut "Execute 1"]
Of course, you'd need to add additional bangs after the first one, corresponding to the meters you want to modify (basically, all the 'Forecast' meters at the end of the code) and to the measures you want to use, but as soon as you do one "set" of such bangs, it's only a matter of copy pasting the set and change the day indexes or day part names in the MouseOverAction of another meter you want to hover on and show a different day or day part.

You'd still have to decide how to approach the hovered meter topic though. You could reuse [MeterTomorrowName] to do it (however I don't see how you can achieve this just by using a simple hover, since unlike scrolling, hovering has no means of setting an "amount" / "index" that you'd want to "slide" to), or you could create other new meters to serve as hover targets (one or two rows of smaller "bullet-like" or numbered-like meters would be suited for this, in order to not overcrowd the skin with meters and make it bigger than desired) - it's your choice. Personally, I would lean towards the latter, something like (only text used below, so it doesn't look that appealing, but you get my point) this towards the bottom of the 2nd rounded rectangle in the skin:

Code: Select all

D1 - D2 - D3 - D4 - D5 - D6 - D7
N1 - N2 - N3 - N4 - N5 - N6 - N7
or

Code: Select all

○ - ○ - ○ - ○ - ○ - ○ - ○
● - ● - ● - ● - ● - ● - ●
where D or are day parts, N or are night parts. Sure the meters should be small enough to not enlarge the skin excessively, yet large enough to make good hover targets. You could even use images instead of text for them, the design is obviously open to interpretation.

Or, maybe you have a better idea that I didn't thought of, I don't know.

P.S. Sorry for the delay in responding, I was a bit busy before. I'll be busy with other stuff I postponed until now tomorrow as well, but I think I can deal with that in order to be relatively free of commitments in the afternoon and evening. ;-)