<?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="55%" scaletvy="10%" scaletvwidth="40%" scaletvheight="40%">
    <scrollbar>
        <area x="52%" y="10%" width="2%" height="80%" layer="2">
            <drawimage imagetype="skinpart" path="scrollbarback" x="0" y="0" width="100%" height="100%"/>
        </area>
        <area x="52%" y="10%" width="2%" height="80%" layer="3">
            <drawimage imagetype="skinpart" path="scrollbar" x="0" y="{areaheight} * {offset} / 1000" width="100%" height="{areaheight} * {height} / 1000"/>
        </area>
    </scrollbar>
    <!-- Available Variables in detailheader and tab:
    {summary}                           short summary of weather
    {icon}                              path to use in <drawimage> to display appropriate weather icon
    {city}                              configured city to display weather for
    {latitude}                          latitude
    {longitude}                         longitude

    {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)
    -->
    <detailheader>
        <area x="1%" y="10%" width="50%" height="80%" layer="2">
            <drawimage imagetype="skinpart" path="displaymendetailback" x="0" y="0" width="100%" height="100%" />
        </area>
        <area x="55%" y="52%" width="43%" height="38%" layer="2">
            <drawimage imagetype="skinpart" path="displaymenucurrentback" x="0" y="0" width="100%" height="100%"/>
        </area>
        <area x="55%" y="52%" width="43%" height="38%" layer="3">
            <drawimage imagetype="icon" path="{icon}" align="center" y="10" width="{areaheight}/2" height="{areaheight}/2"/>
        </area>
        <area x="55%" y="52%" width="43%" height="38%" layer="4">
            <drawtextbox name="summary" x="5" y="55%" width="{areawidth}-10" align="center" height="50%" font="{regular}" fontsize="12%" color="{clrWhite}" text="{summary}" />
        </area>
    </detailheader>

    <tab name="current" x="2%" y="11%" width="48%" height="78%" layer="3" scrollheight="{areaheight}/4">
        <loop name="hourly" x="0" y="0" orientation="vertical" columnwidth="{areawidth}" rowheight="{areaheight}/4">
            <drawtext x="0" y="0" font="{semibold}" fontsize="{rowheight}/2.5" color="{clrWhite}" text="{hourly[timestamp]}" />
            <drawimage imagetype="icon" path="{hourly[icon]}" align="center" y="5" width="{rowheight}*0.5" height="{rowheight}*0.5"/>
            <drawtext name="temp" x="0.7*{columnwidth} + 0.15*{columnwidth} - {width(temp)}/2" font="{light}" y="0" fontsize="{rowheight}*0.4" color="{clrWhite}" text="{hourly[temperature]}°C" />
            <drawtext name="felt" x="0.7*{columnwidth} + 0.15*{columnwidth} - {width(felt)}/2" font="{light}" y="{rowheight}*0.35" fontsize="{rowheight}*0.15" color="{clrWhite}" text="{tr(felt)} {hourly[apparenttemperature]}°C" />
            <drawtext x="0" y="{rowheight}*0.5" width="{columnwidth}" font="{regular}" fontsize="{rowheight}*0.14" color="{clrWhite}" text="{hourly[summary]}" />
            <drawtext x="0" y="{rowheight}*0.64" width="{columnwidth}" font="{regular}" fontsize="{rowheight}*0.14" color="{clrWhite}" text="{tr(precipitationprobability)} {hourly[precipitationprobability]}%, {hourly[precipitationintensity]} l/qm" />
            <drawtext x="0" y="{rowheight}*0.78" width="{columnwidth}" font="{regular}" fontsize="{rowheight}*0.14" color="{clrWhite}" text="{tr(windspeed)} {hourly[windspeed]} km/h {tr(from)} {hourly[windbearingstring]}" />
            <drawimage imagetype="skinpart" path="line_horizontal" x="0" y="{rowheight} - 1" width="{columnwidth}" height="2"/>
        </loop>
    </tab>
</menuplugin>
