Pending MythUI Patches

From MythTV Official Wiki
Revision as of 22:50, 3 October 2009 by Jpoet (talk | contribs)

Jump to: navigation, search

<pending> - buttonlist: Dynamic layout

Add the option for "dynamic" layout of the buttons within a buttonlist. When deciding where to position each button on the screen, the individual size of each button is considered. This allows smaller buttons to take up less room than larger buttons within the same buttonlist.

<buttonlist name="groups">
    <arrange>stack</arrange>
    <area>0,0,1280,70</area>
    <spacing>30</spacing>
    <scrollstyle>center</scrollstyle>
    <align>center</align>
    <wrapstyle>items</wrapstyle>
    <layout>horizontal</layout>
    <buttonarea>10,10,1260,70</buttonarea>
    <statetype name="buttonitem">
        <state name="active">
            <area>0,0,255,100%</area>
	    <shape name="activeGroupShape"> 
	        <area>0, 0, 100%, 85%</area>
	        <align>allcenter</align>
	        <minsize>10%,85%</minsize>
	        <type>roundbox</type> 
		<fill color="#000000" alpha="90" />
		<line color="#FFFFFF" alpha="255" width="1" /> 
		<cornerradius>10</cornerradius> 
	    </shape> 
            <textarea name="name" from="basetextarea">
                <area>5%,5,95%,75%</area>
	        <minsize>5,80%</minsize>
		<multiline>yes</multiline>
		<align>center</align>
		<cutdown>yes</cutdown>
		<font>basesmaller</font>
            </textarea>
        </state>
        <state name="selected" from="active">
	    <shape name="selectedGroupShape"> 
	        <area>0, 0, 100%, 98%</area>
	        <align>allcenter</align>
	        <minsize>20%,95%</minsize>
	        <type>box</type> 
	        <fill color="#0F0FF5" alpha="30" />
	        <line color="#FFFFFF" alpha="255" width="2" /> 
	    </shape> 
            <textarea name="name" from="basetextarea">
                <area>5%,5,95%,95%</area>
	        <minsize>15%,95%</minsize>
	        <multiline>yes</multiline>
	        <align>center</align>
	        <cutdown>yes</cutdown>
	        <font>basemedium</font>
            </textarea>
        </state>
        <state name="inactive" from="selected">
            <imagetype name="pbbgroupselect">
                <area>0,0,100%,98%</area>
                <filename>images/pbb_blueselector.png</filename>
                <alpha>100</alpha>
            </imagetype>
            <textarea name="name">
                <font>basemedium</font>
            </textarea>
        </state>
    </statetype>
</buttonlist>


New <buttonlist> options:

arrange Button arrangement type.

Fixed (default) - Use the fixed position layout engine.
Stack - Stack buttons next to each other.
Fill - evenly spread buttons out to fill area.

align Aligns buttons in both horizontal and vertical directions. Valid values are: left, right, top, bottom, hcenter, vcenter, center and allcenter. Center is an alias for allcenter. Only valid with <arrange>Stack or Fill</arrange>.
scrollstyle sets the scrolling behavior of the buttonlist. Valid options are center (selected item is always in the center), groupcenter (selected item is allowed to float in the center of the group, so the group as a whole can stay centered) and free (selector freely moves through the list). groupcenter is only valid with <arrange>Stack or Fill</arrange>.

New <textbutton>, <shape> and <imagetype> option enabled with <arrange>Stack or Fill</arrange>

minsize Minimum size the button is allowed to shrink to. Takes two arguments: horizontal and vertical size. Percentages are allowed.