DVDBuilder for C++  3.4
DVD Authoring Software Development Kit
<button> Element

Description

Defines a highlight area and a navigation command, that can be selected, and activated by the viewer. There can be up to 36 buttons per one menu.

<button
   left="num"
   top="num"
   width="num"
   height="num"
   navigate="Menu=id;|Title=id;|Title=id; Chapter=num;" />
Required Attributes
Attribute Option Description
left

1 to 720 (NTSC)

1 to 720 (PAL)

Specifies the left position of the button rectangle.
top

1 to 480 (NTSC)

1 to 576 (PAL)

Specifies the top position of the button rectangle.
width

1 to 720 (NTSC)

1 to 720 (PAL)

Specifies the width of the button rectangle.
height

1 to 480 (NTSC)

1 to 576 (PAL)

Specifies the height of the button rectangle.
navigate Menu=id;

Navigates to a menu with ID "id".

Example: Menu=50001;

Title=id;

Navigates to a title with ID "id".

Example: Title=1;

Title=id; Chapter=num;

Navigates to Chapter with number "num" from Title with ID "id". This navigation command can be used onlyin titleSet (VTS) menus.

Example: Title=1;Chapter=1;

Child Elements
Element Description
<command> Specifies the VM command to be executed when the button is activated.

Remarks

When a button is selected, the portion of the mask enclosed in button's rectangular area is shown with certain colors and opacity, as defined in the <selection> element. The DVD specification allows up to 36 buttons per menu.

If <command> child element is specified then the attribute "navigate" is not required. If both <command> child element and attribute "navigate" are specified then the program will use only the <command> child element.

Example

The following example shows a DVD that has a VMG Title menu with one button. When the button is activated the DVD player will play the contents of chapter 1 from title 1.

<?xml version='1.0' encoding='utf-8'?>
<dvd version='2.3' xmlns='http://www.primosoftware.com/dvdbuilder/2.3'>
<videoManager firstPlayNavigate='Menu=50001;'>
<menus>
<menu id='50001' entry='title'>
<button left='10' top='10' width='74' height='51' navigate='Title=1;Chapter=1;' />
<background file='menu_50001.mpg' />
<mask
file='menu_50001_mask.bmp'
patternColor='#FFFFFF'
backgroundColor='#000000'
emphasisColor1='#000001'
emphasisColor2='#000001' />
<display
patternColor ='#000000' patternContrast ='#000000'
backgroundColor='#000000' backgroundContrast='#000000'
emphasis1Color ='#000000' emphasis1Contrast ='#000000'
emphasis2Color ='#000000' emphasis2Contrast ='#000000'/>
<action
patternColor='#0000FF' patternContrast='7'
backgroundColor='#000000' backgroundContrast='#000000'
emphasis2Color='#000000' emphasis2Contrast='#000000'
emphasis1Color='#000000' emphasis1Contrast='#000000'/>
<selection
patternColor='#FF0000' patternContrast='7'
backgroundColor='#000000' backgroundContrast='#000000'
emphasis1Color='#000000' emphasis1Contrast='#000000'
emphasis2Color='#000000' emphasis2Contrast='#000000'/>
</menu>
</menus>
</videoManager>
<titleSet>
<titles>
<title id='1' chapters='00:00:00;'>
<videoObject file='1.mpg'/>
</title>
</titles>
</titleSet>
</dvd>