vdr-plugin-skindesigner/skins/nopacity/xmlfiles/plug-weatherforecast-weatherforecast.xml
2015-01-15 14:03:22 +01:00

143 lines
11 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE menuplugin SYSTEM "../../../dtd/displaymenuplugin.dtd">
<menuplugin x="0" y="0" width="100%" height="100%" fadetime="0" scaletvx="33%" scaletvy="10%" scaletvwidth="65%" scaletvheight="80%">
<scrollbar>
<area x="30%" y="11%" width="2%" height="78%" layer="2">
<fill color="{clrBorder}" />
<drawrectangle x="2" y="2" width="{areawidth} - 4" height="{areaheight} - 4" color="{clrTransparent}" />
<drawrectangle x="4" y="4 + {areaheight} * {offset} / 1000" width="{areawidth} - 8" height="{areaheight} * {height} / 1000 - 8" color="{clrProgressbar}" />
</area>
</scrollbar>
<menuitems x="0" y="10%" orientation="vertical" width="100%" height="82%" align="center" numlistelements="10">
<!-- Available Variables:
{current}
{menuitemtext} "Current Weather", "Next 48 hours" or "Next 7 days"
{iscurrent} true if item is "Current Weather"
{ishourly} true if item is "Next 48 hours"
{isdaily} true if item is "Next 7 days"
{city} configured city to display weather for
{latitude} latitude
{longitude} longitude
If {iscurrent} is true, the following tokens are set:
{timestamp} timestamp in hh:mm dd.mm of current forecast
{temperature} current temperature in °C
{apparenttemperature} apparent (felt) temperature in °C
{summary} short summary of current weather
{icon} path to use in <drawimage> to display appropriate weather icon
{precipitationintensity} precipitation intensity in l/qm
{precipitationprobability} precipitation probability in %
{precipitationtype} precipitation type (snow, ...)
{humidity} humidity in %
{windspeed} wind speed in km/h
{windbearing} wind bearing in degrees
{windbearingstring} wind bearing as human readable string (e.g NE, NNE, ...)
{visibility} visibility in km
{cloudcover} cloud cover in %
{pressure} pressure in HPa
{ozone} Ozone in DU (Dobson Unit)
If {ishourly} is true, the following tokens are set:
{summary} short summary of weather
{icon} path to use in <drawimage> to display appropriate weather icon
{hourly[]} array with up to 48 hourly forecasts
{hourly[num]} number of forecast, starting at 1
{hourly[timestamp]} timestamp in hh:mm
{hourly[temperature]} temperature in °C
{hourly[apparenttemperature]} apparent (felt) temperature in °C
{hourly[summary]} short summary
{hourly[icon]} path to use in <drawimage> to display appropriate weather icon
{hourly[precipitationintensity]} precipitation intensity in l/qm
{hourly[precipitationprobability]} precipitation probability in %
{hourly[precipitationtype]} precipitation type (snow, ...)
{hourly[humidity]} humidity in %
{hourly[windspeed]} wind speed in km/h
{hourly[windbearing]} wind bearing in degrees
{hourly[windbearingstring]} wind bearing as human readable string (e.g NE, NNE, ...)
{hourly[visibility]} visibility in km
{hourly[cloudcover]} cloud cover in %
{hourly[pressure]} pressure in HPa
{hourly[ozone]} Ozone in DU (Dobson Unit)
If {isdaily} is true, the following tokens are set:
{summary} short summary of weather
{icon} path to use in <drawimage> to display appropriate weather icon
{daily[day]} day of forecast in dd.mm
{daily[dayname]} three letter abbrivated day name
{daily[temperaturemin]} minimum temperature at this day in °C
{daily[temperaturemintime]} time of minimum temperature
{daily[temperaturemax]} maximum temperature at this day in °C
{daily[temperaturemaxtime]} time of maximum temperature
{daily[summary]} short summary
{daily[icon]} path to use in <drawimage> to display appropriate weather icon
{daily[precipitationintensity]} precipitation intensity in l/qm
{daily[precipitationprobability]} precipitation probability in %
{daily[precipitationtype]} precipitation type (snow, ...)
{daily[humidity]} humidity in %
{daily[windspeed]} wind speed in km/h
{daily[windbearing]} wind bearing in degrees
{daily[windbearingstring]} wind bearing as human readable string (e.g NE, NNE, ...)
{daily[visibility]} visibility in km
{daily[cloudcover]} cloud cover in %
{daily[pressure]} pressure in HPa
{daily[ozone]} Ozone in DU (Dobson Unit)
-->
<listelement>
<!-- Background -->
<area x="0" width="28%" layer="2">
<drawimage condition="not{current}" imagetype="skinpart" path="menubutton" x="0" y="1%" width="{areawidth}" height="{areaheight}*0.98"/>
<drawimage condition="{current}" imagetype="skinpart" path="menubuttonactive" x="0" y="1%" width="{areawidth}" height="{areaheight}*0.98"/>
</area>
<areascroll condition="not{current}" scrollelement="menuelement" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="0" width="28%" layer="3">
<drawtext name="menuelement" x="10" valign="center" font="{vdrOsd}" fontsize="50%" color="{clrFontMenuItem}" text="{menuitemtext}" />
</areascroll>
<areascroll condition="{current}" scrollelement="menuelement" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="0" width="28%" layer="3">
<drawtext name="menuelement" x="10" valign="center" font="{vdrOsd}" fontsize="50%" color="{clrFontMenuItemSelected}" text="{menuitemtext}" />
</areascroll>
</listelement>
<!-- additional element which is drawn for current element -->
<!-- All Tokens from listelement are available -->
<currentelement delay="100" fadetime="0">
<area x="32%" y="2%" width="67%" height="96%" layer="2">
<fill color="{clrTransBlack}" />
</area>
<area condition="{iscurrent}" x="32%" y="2%" width="67%" height="96%" layer="3">
<drawimage name="weathericon" imagetype="icon" path="{icon}" x="2%" y="0" width="{areawidth}*0.2" height="{areawidth}*0.2"/>
<drawtext align="right" y="2%" font="{semibold}" fontsize="6%" color="{clrWhite}" text="{city}" />
<drawtext align="right" y="8%" font="{vdrOsd}" fontsize="6%" color="{clrWhite}" text="{timestamp}" />
<drawtext align="right" y="14%" font="{vdrOsd}" fontsize="12%" color="{clrWhite}" text="{temperature}°C" />
<drawtext align="right" y="26%" font="{vdrOsd}" fontsize="6%" color="{clrWhite}" text="{summary}" />
<drawtext x="2%" y="45%" font="{vdrOsd}" fontsize="6%" color="{clrWhite}" text="{tr(apparenttemp)}: {apparenttemperature} °C" />
<drawtext x="2%" y="51%" font="{vdrOsd}" fontsize="6%" color="{clrWhite}" text="{tr(precipitationprobability)}: {precipitationprobability} %" />
<drawtext x="2%" y="57%" font="{vdrOsd}" fontsize="6%" color="{clrWhite}" text="{tr(precipitationintensity)}: {precipitationintensity} l/qm" />
<drawtext x="2%" y="63%" font="{vdrOsd}" fontsize="6%" color="{clrWhite}" text="{tr(humidity)}: {humidity} %" />
<drawtext x="2%" y="69%" font="{vdrOsd}" fontsize="6%" color="{clrWhite}" text="{tr(windspeed)}: {windspeed} km/h" />
<drawtext x="2%" y="75%" font="{vdrOsd}" fontsize="6%" color="{clrWhite}" text="{tr(windbearing)}: {windbearingstring} ({windbearing} °)" />
<drawtext x="2%" y="81%" font="{vdrOsd}" fontsize="6%" color="{clrWhite}" text="{tr(cloudcover)}: {cloudcover} %" />
</area>
<area condition="{ishourly}" x="32%" y="2%" width="67%" height="96%" layer="3">
<loop name="hourly" x="0" y="0" orientation="vertical" columnwidth="{areawidth}" rowheight="{areaheight}/12" overflow="cut">
<drawtext x="2%" font="{semibold}" fontsize="7%" valign="center" color="{clrWhite}" text="{hourly[timestamp]}" />
<drawimage imagetype="icon" path="{hourly[icon]}" x="22%" valign="center" width="{rowheight}*0.8" height="{rowheight}*0.8"/>
<drawtext x="35%" font="{vdrOsd}" fontsize="7%" valign="center" color="{clrWhite}" text="{hourly[temperature]}°C" />
<drawtext x="60%" font="{vdrOsd}" fontsize="5%" valign="center" width="38%" color="{clrWhite}" text="{hourly[summary]}" />
<drawrectangle x="2%" y="{rowheight} - 1" width="{columnwidth}*0.96" height="1" color="{clrWhite}" />
</loop>
</area>
<area condition="{isdaily}" x="32%" y="2%" width="67%" height="96%" layer="3">
<loop name="daily" x="2%" y="0" orientation="vertical" columnwidth="{areawidth}*0.96" rowheight="{areaheight}/7" overflow="cut">
<drawtext x="0" font="{semibold}" fontsize="{rowheight}/2" y="5" color="{clrWhite}" text="{daily[dayname]} {daily[day]}" />
<drawtext x="35%" font="{vdrOsd}" fontsize="{rowheight}/2" y="5" color="{clrWhite}" text="{daily[temperaturemin]}°C - {daily[temperaturemax]}°C" />
<drawtext x="0" font="{vdrOsd}" fontsize="{rowheight}*0.3" width="{columnwidth} - {rowheight}*0.7" y="{rowheight}*0.6" color="{clrWhite}" text="{daily[summary]}" />
<drawimage imagetype="icon" path="{daily[icon]}" x="{columnwidth} - {rowheight}*0.7" valign="center" width="{rowheight}*0.7" height="{rowheight}*0.7"/>
<drawrectangle x="0" y="{rowheight} - 1" width="{columnwidth}" height="1" color="{clrWhite}" />
</loop>
</area>
</currentelement>
</menuitems>
</menuplugin>