Difference between revisions of "Menu-ui.xml"

From MythTV Official Wiki
Jump to: navigation, search
m (added page to themes category)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
menu-ui.xml is a new file proposed to be used to specify the organisation of mythtv's main menu screens
+
The menu-ui.xml file governs the layout and behavior of the Myth's menu structure.  It consists of the following windows and named attributes:
  
<myththeme>
+
= Screen Wizard Windows =
 +
<center>
 +
{| cellpadding="4" border="1"
 +
| align="center"  |<b>Window Name</b>
 +
| align="center"  |<b>Type</b>
 +
| align="center"  |<b>Description</b>
 +
|-
 +
| style="background:silver" | mainmenu
 +
| style="background:silver" align="center" | Window
 +
| style="background:silver" | Myth's menu structure.
 +
|}
  
It is comprised of:  The mainmenu window. 
 
  
    <nowiki><window name="mainmenu"></nowiki>
+
=== The "mainmenu" window ===
  
 
+
{| cellpadding="4" border="1"
font definitions:
+
| align="center" |<b>Widget Name</b>  
 
+
| align="center" |<b>Widget Type</b>  
<pre><font name="basefont" face="Arial">
+
| align="center|<b>Description</b>  
        <color>#FFFFFF</color>
+
| align="center" |<b>Required?</b>
        <size>22</size>
+
|-  
        <size:small>16</size:small>
+
| style="background:darkturquoise" | menu
        <size:big>50</size:big>
+
| style="background:darkturquoise" align="center" | buttonlist
    </font>
+
| style="background:darkturquoise" | A buttonlist which defines the format of all of Myth's structural (non-popup) menus.
 
+
| style="background:darkturquoise" align="center" | <b>Yes</b>
    <font name="redfont" from="basefont"> <!-- define 'redfont' inheriting properties of 'basefont' N.B. 'from=' replaces 'base=' used before mythui -->
+
|-  
        <color>#FF0000</color>
+
| description
    </font>
+
| align="center" | textarea
   
+
| A text area describing the purpose of the selected item.  Can also be used in the menu buttonlist's items.
    <font name="greenfont" from="basefont">
+
| align="center" | No
        <color>#00FF00</color>
+
|}
    </font></pre>
+
[[Category:Themes]]
An (optional) clock definition:
 
 
 
  <nowiki> <clock name="clock">
 
        <area>300,200,200,40</area> <!-- clock area 200 px wide by 40 px high starting at 300,300 -->
 
        <font>basefont</font>
 
        <align>right</align> <!-- optional attribute, defaults to  'left' -->
 
        <format>%DATE% %TIME%</format> <!-- valid values are:  -->
 
        <alpha>200</alpha> <!-- optional, sets text opacity.  Defaults to 255 -->
 
    </clock></nowiki>
 
 
 
Definition of menu page titles:
 
 
 
<pre>
 
<statetype name="titles">
 
    <position>20,20</position> <!-- position at 20 px from the left, 20px from the top of screen -->
 
    <state name="TV">
 
        <imagetype name="TV">
 
            <filename>title/title_tv.png</filename>
 
        </imagetype>
 
    </state>
 
    <state name="TVSETUP" from="TV" /> <!-- inherit from 'TV' state -->
 
...
 
...
 
...
 
</statetype>
 
</pre>
 
 
 
Note that the states do not have to contain merely images, they could just as easily be defined as follows:
 
 
 
<pre><state name="TV">
 
    <textarea name="TV">
 
        <area>0,0,300,40</area>
 
        <font>menufont</font>
 
        <align>right</align>
 
        <alpha>127</alpha> <!-- set to half transparent -->
 
        <value>TV</value> <!-- the text to be displayed -->
 
    </textarea>
 
</state></pre>
 
 
 
Or, possibly a combination of text and images:
 
 
 
<pre><state name="TV">
 
    <imagetype name="TV">
 
            <filename>title/title_tv.png</filename>
 
    </imagetype>
 
    <textarea name="TV2"> <!-- children of the same parent need unique names -->
 
        <area>0,0,300,40</area>
 
        <font>menufont</font>
 
        <align>right</align>
 
        <alpha>127</alpha> <!-- set to half transparent -->
 
        <value>TV</value> <!-- the text to be displayed -->
 
    </textarea>
 
</state></pre>
 

Latest revision as of 03:36, 23 August 2011

The menu-ui.xml file governs the layout and behavior of the Myth's menu structure. It consists of the following windows and named attributes:

Screen Wizard Windows

Window Name Type Description
mainmenu Window Myth's menu structure.


The "mainmenu" window

Widget Name Widget Type Description Required?
menu buttonlist A buttonlist which defines the format of all of Myth's structural (non-popup) menus. Yes
description textarea A text area describing the purpose of the selected item. Can also be used in the menu buttonlist's items. No