<menurecordings x="0" y="0" width="100%" height="100%" fadetime="0" scaletvx="39%" scaletvy="8%" scaletvwidth="60%" scaletvheight="60%">

    <background>
        <area x="0" y="0" width="100%" height="100%" layer="1">
            <drawimage condition="eq({indexrecmenustyle}, 0)" imagetype="skinpart" x="0" y="0" width="100%" height="100%" path="background_menu_tvframe" />
            <drawimage condition="eq({indexrecmenustyle}, 1)" imagetype="skinpart" x="0" y="0" width="100%" height="100%" path="background_menu" />
        </area>
        <area condition="eq({indexrecmenustyle}, 0)" x="39%" y="70%" width="60%" height="20%" layer="2">
            <fill color="{menuback}" />
        </area>
    </background>

    <scrollbar>
        <area condition="lt({height}, 1000) ++ eq({indexrecmenustyle}, 0)" x="33%" y="9%" width="{areawidth}*0.01" height="82%" layer="2">
            <fill color="{menuback}" />
        </area>
        <area condition="lt({height}, 1000) ++ eq({indexrecmenustyle}, 1)" x="98%" y="9%" width="{areawidth}*0.01" height="82%" layer="2">
            <fill color="{menuback}" />
        </area>
        <area condition="lt({height}, 1000) ++ eq({indexrecmenustyle}, 0)" x="33%" y="9%" width="{areawidth}*0.01" height="82%" layer="3">
            <drawrectangle x="0" y="{areaheight} * {offset} / 1000" width="100%" height="{areaheight} * {height} / 1000" color="{progressbar}" />
        </area>
        <area condition="lt({height}, 1000) ++ eq({indexrecmenustyle}, 1)" x="98%" y="9%" width="{areawidth}*0.01" height="82%" layer="3">
            <drawrectangle x="0" y="{areaheight} * {offset} / 1000" width="100%" height="{areaheight} * {height} / 1000" color="{progressbar}" />
        </area>
    </scrollbar>

    <menuitems x="2%" y="9%" condition="eq({indexrecmenustyle}, 0)" orientation="vertical" width="98%" height="82%" align="center" numlistelements="{numitemsrecnarrow}">
        <listelement>
            <area x="0" y="0" width="{areawidth}*0.305" height="100%" layer="2">
                <drawrectangle condition="not{current}" x="0" y="0" width="100%" height="100%" color="{menuback}" />
                <drawrectangle condition="not{current}" x="0" y="{areaheight}-1" width="100%" height="1" color="{menubackline}" />
                <drawrectangle condition="{current}" x="0" y="0" width="100%" height="100%" color="{menubackactive}" />
            </area>
            <!-- recording folder -->
            <area condition="{folder}" x="1%" width="6%" layer="3">
                <drawimage condition="not{current}" imagetype="icon" path="ico_recfolder" x="0" width="0.8*{areaheight}" height="0.9*{areaheight}" valign="center" />
                <drawimage condition="{current}" imagetype="icon" path="ico_recfolder_active" x="0" width="0.8*{areaheight}" height="0.9*{areaheight}" valign="center" />
            </area>
            <area condition="{folder}" x="6%" width="24%" layer="3">
                <drawtext condition="not{current}" x="0" y="{areaheight}*{recposyfolderstats}/100" font="{regular}" fontsize="{areaheight}*{recsizefolderstats}/100" color="{fontdefault}" text="({numrecordingsfolder} recordings, {newrecordingsfolder} new)" />
                <drawtext condition="{current}" x="0" y="{areaheight}*{recposyfolderstats}/100" font="{regular}" fontsize="{areaheight}*{recsizefolderstats}/100" color="{fontmenuactive}" text="({numrecordingsfolder} recordings, {newrecordingsfolder} new)" />
            </area>
            <areascroll condition="{folder}" scrollelement="foldertext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="6%" width="24%" layer="3">
                <drawtext condition="not{current}" x="0" y="{areaheight}*{recposyfoldertitle}/100" font="{regular}" fontsize="{areaheight}*{recsizefoldertitle}/100" color="{fontdefault}" text="{name}" />
                <drawtext condition="{current}" x="0" y="{areaheight}*{recposyfoldertitle}/100" font="{regular}" fontsize="{areaheight}*{recsizefoldertitle}/100" color="{fontmenuactive}" text="{name}" />
            </areascroll>
            <!-- recording -->
            <area condition="not{folder}++not{current}" x="1%" y="0" width="29%" layer="3">
                <drawtext x="0" y="{areaheight}*{recposydate}/100" font="{regular}" fontsize="{areaheight}*{recsizedate}/100" color="{fontdefault}" text="{printf('%02d.%02d.%d', daynumeric, month, year)} {time}" />
                <drawimage condition="{new}" name="new" imagetype="icon" path="ico_new" x="{areawidth} - {areaheight}/2" y="5%" width="0.45*{areaheight}" height="0.45*{areaheight}" />
                <drawimage condition="{new}++{cutted}" imagetype="icon" path="ico_cutted" x="{areawidth} - {areaheight}" y="5%" width="0.45*{areaheight}" height="0.45*{areaheight}" />
                <drawimage condition="not{new}++{cutted}" imagetype="icon" path="ico_cutted" x="{areawidth} - {areaheight}/2" y="5%" width="0.45*{areaheight}" height="0.45*{areaheight}" />
            </area>
            <area condition="not{folder}++{current}" x="1%" y="0" width="29%" layer="3">
                <drawtext x="0" y="{areaheight}*{recposydate}/100" font="{regular}" fontsize="{areaheight}*{recsizedate}/100" color="{fontmenuactive}" text="{printf('%02d.%02d.%d', daynumeric, month, year)} {time}" />
                <drawimage condition="{new}" name="new" imagetype="icon" path="ico_new_active" x="{areawidth} - {areaheight}/2" y="5%" width="0.45*{areaheight}" height="0.45*{areaheight}" />
                <drawimage condition="{new}++{cutted}" imagetype="icon" path="ico_cutted_active" x="{areawidth} - {areaheight}" y="5%" width="0.45*{areaheight}" height="0.45*{areaheight}" />
                <drawimage condition="not{new}++{cutted}" imagetype="icon" path="ico_cutted_active" x="{areawidth} - {areaheight}/2" y="5%" width="0.45*{areaheight}" height="0.45*{areaheight}" />
            </area>
            <areascroll condition="not{current}++not{folder}" scrollelement="rectitle" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="1%" width="29%" layer="3">
                <drawtext name="rectitle" x="0" width="100%" y="{areaheight}*{recposytitle}/100" font="{regular}" fontsize="{areaheight}*{recsizetitle}/100" color="{fontdefault}" text="{name}" />
            </areascroll>
            <areascroll condition="{current}++not{folder}" scrollelement="rectitle" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="1%" width="29%" layer="3">
                <drawtext name="rectitle" x="0" width="100%" y="{areaheight}*{recposytitle}/100" font="{regular}" fontsize="{areaheight}*{recsizetitle}/100" color="{fontmenuactive}" text="{name}" />
            </areascroll>
        </listelement>

        <currentelement delay="100" fadetime="200">
            <area condition="{hasposter}" x="39%" y="76%" width="7%" height="22%" layer="3">
                <drawimage imagetype="image" path="{posterpath}" x="0" valign="center" width="{areawidth}" height="{areawidth} * {posterheight} / {posterwidth}" />
            </area>
            <areascroll condition="{hasposter}" orientation="vertical" mode="forthandback" delay="3000" scrollspeed="medium" x="47%" y="76%" width="49%" height="20%" layer="3">
                <drawtext name="datetime" x="0" y="0" font="{regular}" width="100%" fontsize="{areaheight}*{recsizecurrenttext}/100" color="{fontdefault}" text="{date} {time}, {duration} min" />
                <drawtext name="title" x="0" y="{height(datetime)}" font="{regular}" width="100%" fontsize="{areaheight}*{recsizecurrenttitle}/100" color="{fontdefault}" text="{epgname}" />
                <drawtextbox name="shorttext" x="0" y="{posy(title)} + {height(title)}" width="100%" font="{regular}" fontsize="{areaheight}*{recsizecurrenttext}/100" color="{fontdefault}" text="{shorttext}" />
                <drawtextbox x="0" y="{posy(shorttext)} + {height(shorttext)} + 10" width="100%" font="{regular}" fontsize="{areaheight}*{recsizecurrenttext}/100" color="{fontdefault}" text="{description}" />
            </areascroll>
            <areascroll condition="not{hasposter}" orientation="vertical" mode="forthandback" delay="3000" scrollspeed="medium" x="39%" y="76%" width="57%" height="20%" layer="3">
                <drawtext name="datetime" x="0" y="0" font="{regular}" width="100%" fontsize="{areaheight}*{recsizecurrenttext}/100" color="{fontdefault}" text="{date} {time}, {duration} min" />
                <drawtext name="title" x="0" y="{height(datetime)}" font="{regular}" width="100%" fontsize="{areaheight}*{recsizecurrenttitle}/100" color="{fontdefault}" text="{epgname}" />
                <drawtextbox name="shorttext" x="0" y="{posy(title)}+{height(title)}" width="100%" font="{regular}" fontsize="{areaheight}*{recsizecurrenttext}/100" color="{fontdefault}" text="{shorttext}" />
                <drawtextbox x="0" y="{posy(shorttext)} + {height(shorttext)} + 10" width="100%" font="{regular}" fontsize="{areaheight}*{recsizecurrenttext}/100" color="{fontdefault}" text="{description}" />
            </areascroll>
        </currentelement>
    </menuitems>

    <menuitems x="2%" y="9%" condition="eq({indexrecmenustyle}, 1)" orientation="vertical" width="95%" height="82%" align="center" numlistelements="{numitemsrecwide}">
        <listelement>
            <area x="0" y="0" width="100%" height="100%" layer="2">
                <drawrectangle condition="not{current}" x="0" y="0" width="100%" height="100%" color="{menuback}" />
                <drawrectangle condition="not{current}" x="0" y="{areaheight}-1" width="100%" height="1" color="{menubackline}" />
                <drawrectangle condition="{current}" x="0" y="0" width="100%" height="100%" color="{menubackactive}" />
            </area>
            <!-- recording folder -->
            <areacontainer condition="{folder}">
                <area x="1%" width="6%" layer="3">
                    <drawimage condition="not{current}" imagetype="icon" path="ico_recfolder" x="0" width="0.8*{areaheight}" height="0.9*{areaheight}" valign="center" />
                    <drawimage condition="{current}" imagetype="icon" path="ico_recfolder_active" x="0" width="0.8*{areaheight}" height="0.9*{areaheight}" valign="center" />
                </area>
                <areascroll scrollelement="foldertext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="6%" y="0" width="93%" height="100%" layer="3">
                    <drawtext condition="not{current}" x="0" valign="center" font="{regular}" fontsize="{areaheight}*{recsizewide}/100" color="{fontdefault}" text="{name} ({numrecordingsfolder} recordings, {newrecordingsfolder} new)" />
                    <drawtext condition="{current}" x="0" valign="center" font="{regular}" fontsize="{areaheight}*{recsizewide}/100" color="{fontmenuactive}" text="{name} ({numrecordingsfolder} recordings, {newrecordingsfolder} new)" />
                </areascroll>
            </areacontainer>
            <areacontainer condition="not{folder}">
                <area condition="not{current}" x="94%" width="6%" layer="3">
                    <drawimage condition="{new}" name="new" imagetype="icon" path="ico_new" x="{areawidth} - 0.6*{areaheight}" width="0.6*{areaheight}" height="0.6*{areaheight}" valign="center" />
                    <drawimage condition="{cutted}" imagetype="icon" path="ico_cutted" x="{areawidth} - 1.3*{areaheight}" width="0.6*{areaheight}" height="0.6*{areaheight}" valign="center" />
                </area>
                <area condition="{current}" x="94%" width="6%" layer="3">
                    <drawimage condition="{new}" name="new" imagetype="icon" path="ico_new_active" x="{areawidth} - 0.6*{areaheight}" width="0.6*{areaheight}" height="0.6*{areaheight}" valign="center" />
                    <drawimage condition="{cutted}" imagetype="icon" path="ico_cutted_active" x="{areawidth} - 1.3*{areaheight}" width="0.6*{areaheight}" height="0.6*{areaheight}" valign="center" />
                </area>
                <areascroll condition="not{current}" scrollelement="rectitle" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="1%" width="93%" layer="3">
                    <drawtext name="rectitle" x="0" width="100%" valign="center" font="{regular}" fontsize="{areaheight}*{recsizewide}/100" color="{fontdefault}" text="{printf('%02d.%02d.%d', daynumeric, month, year)} {time}  {name}" />
                </areascroll>
                <areascroll condition="{current}" scrollelement="rectitle" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="1%" width="93%" layer="3">
                    <drawtext name="rectitle" x="0" width="100%" valign="center" font="{regular}" fontsize="{areaheight}*{recsizewide}/100" color="{fontmenuactive}" text="{printf('%02d.%02d.%d', daynumeric, month, year)} {time}  {name}" />
                </areascroll>
            </areacontainer>
        </listelement>

        <currentelement delay="1000" fadetime="200">
            <areacontainer condition="{recshowcurrent} ++ lt({numitem}, 11)">
                <area x="20%" y="{menuitemy}+{menuitemheight}" width="80%" height="31%" layer="4">
                    <fill color="{messageback}" />
                </area>
                <area condition="{hasposter}" x="21%" y="{menuitemy}+{menuitemheight}" width="12%" height="30%" layer="5">
                    <drawimage imagetype="image" path="{posterpath}" x="0" valign="center" width="{areawidth}" height="{areawidth} * {posterheight} / {posterwidth}" />
                </area>
                <areascroll condition="{hasposter}" orientation="vertical" mode="forthandback" delay="3000" scrollspeed="medium" x="34%" y="{menuitemy}+{menuitemheight} + {areaheight}*0.01" width="65%" height="29%" layer="5">
                    <drawtext name="datetime" x="0" y="0" font="{regular}" width="100%" fontsize="{areaheight}*{recsizecurrenttext}/100" color="{fontdefault}" text="{date} {time}, {duration} min" />
                    <drawtext name="title" x="0" y="{height(datetime)}" font="{regular}" width="100%" fontsize="{areaheight}*{recsizecurrenttitle}/100" color="{fontdefault}" text="{epgname}" />
                    <drawtextbox name="shorttext" x="0" y="{posy(title)} + {height(title)}" width="100%" font="{regular}" fontsize="{areaheight}*{recsizecurrenttext}/100" color="{fontdefault}" text="{shorttext}" />
                    <drawtextbox x="0" y="{posy(shorttext)} + {height(shorttext)} + 10" width="100%" font="{regular}" fontsize="{areaheight}*{recsizecurrenttext}/100" color="{fontdefault}" text="{description}" />
                </areascroll>
                <areascroll condition="not{hasposter}" orientation="vertical" mode="forthandback" delay="3000" scrollspeed="medium" x="21%" y="{menuitemy}+{menuitemheight} + {areaheight}*0.01" width="78%" height="29%" layer="5">
                    <drawtext name="datetime" x="0" y="0" font="{regular}" width="100%" fontsize="{areaheight}*{recsizecurrenttext}/100" color="{fontdefault}" text="{date} {time}, {duration} min" />
                    <drawtext name="title" x="0" y="{height(datetime)}" font="{regular}" width="100%" fontsize="{areaheight}*{recsizecurrenttitle}/100" color="{fontdefault}" text="{epgname}" />
                    <drawtextbox name="shorttext" x="0" y="{posy(title)}+{height(title)}" width="100%" font="{regular}" fontsize="{areaheight}*{recsizecurrenttext}/100" color="{fontdefault}" text="{shorttext}" />
                    <drawtextbox x="0" y="{posy(shorttext)} + {height(shorttext)} + 10" width="100%" font="{regular}" fontsize="{areaheight}*{recsizecurrenttext}/100" color="{fontdefault}" text="{description}" />
                </areascroll>
            </areacontainer>
            <areacontainer condition="{recshowcurrent} ++ gt({numitem}, 10)">
                <area x="20%" y="{menuitemy} - {areaheight}*0.31" width="80%" height="31%" layer="4">
                    <fill color="{messageback}" />
                </area>
                <area condition="{hasposter}" x="21%" y="{menuitemy} - {areaheight}*0.31" width="12%" height="30%" layer="5">
                    <drawimage imagetype="image" path="{posterpath}" x="0" valign="center" width="{areawidth}" height="{areawidth} * {posterheight} / {posterwidth}" />
                </area>
                <areascroll condition="{hasposter}" orientation="vertical" mode="forthandback" delay="3000" scrollspeed="medium" x="34%" y="{menuitemy} + {areaheight}*0.01 - {areaheight}*0.31" width="65%" height="29%" layer="5">
                    <drawtext name="datetime" x="0" y="0" font="{regular}" width="100%" fontsize="{areaheight}*{recsizecurrenttext}/100" color="{fontdefault}" text="{date} {time}, {duration} min" />
                    <drawtext name="title" x="0" y="{height(datetime)}" font="{regular}" width="100%" fontsize="{areaheight}*{recsizecurrenttitle}/100" color="{fontdefault}" text="{epgname}" />
                    <drawtextbox name="shorttext" x="0" y="{posy(title)} + {height(title)}" width="100%" font="{regular}" fontsize="{areaheight}*{recsizecurrenttext}/100" color="{fontdefault}" text="{shorttext}" />
                    <drawtextbox x="0" y="{posy(shorttext)} + {height(shorttext)} + 10" width="100%" font="{regular}" fontsize="{areaheight}*{recsizecurrenttext}/100" color="{fontdefault}" text="{description}" />
                </areascroll>
                <areascroll condition="not{hasposter}" orientation="vertical" mode="forthandback" delay="3000" scrollspeed="medium" x="21%" y="{menuitemy} + {areaheight}*0.01 - {areaheight}*0.31" width="78%" height="29%" layer="5">
                    <drawtext name="datetime" x="0" y="0" font="{regular}" width="100%" fontsize="{areaheight}*{recsizecurrenttext}/100" color="{fontdefault}" text="{date} {time}, {duration} min" />
                    <drawtext name="title" x="0" y="{height(datetime)}" font="{regular}" width="100%" fontsize="{areaheight}*{recsizecurrenttitle}/100" color="{fontdefault}" text="{epgname}" />
                    <drawtextbox name="shorttext" x="0" y="{posy(title)}+{height(title)}" width="100%" font="{regular}" fontsize="{areaheight}*{recsizecurrenttext}/100" color="{fontdefault}" text="{shorttext}" />
                    <drawtextbox x="0" y="{posy(shorttext)} + {height(shorttext)} + 10" width="100%" font="{regular}" fontsize="{areaheight}*{recsizecurrenttext}/100" color="{fontdefault}" text="{description}" />
                </areascroll>
            </areacontainer>
        </currentelement>
    </menuitems>
</menurecordings>