We spend a fair amount of time focusing on "cool" menus in HD DVD -- with animations, transparency, and so on -- but sometimes you just want to get a title out and all you really needs is a basic menu system. You may even have some assets already set up from your standard-def DVD that you can just re-scale to 1920 x 1080 and re-use on your HD DVD. Now of course you could just do "Standard Content" on HD DVD, but you can do better than that; how about having the same basic menu experience of your SD DVD, but without stopping the movie and with minimal time and effort?
Well, attached is a basic sample I wrote for doing just that -- it's a set of pre-built behaviours and some script that you can use to (relatively) easily author a basic HD DVD title by simply resizing your graphics and then modifying the markup files, ala basic HTML page development. All you do is create one XMU file for each "page" of your normal menu system, drop in your graphics, resize everything so it looks good, and then make sure all your button IDs match up to the various A/V assets and other pages in the system.
Here's a bit of an overview.
The design of this sample is that pretty much everything is driven through the markup files, and even then it is limited to styling and layout. You shouldn't need to write any script or do any custom animations (unless you want to). This is accomplished by defining a set of classes that carry with them default behaviours, and when you author the menu pages you simply assign one or more classes to the buttons based on what you want them to do. For example, if you have a button for Chapter 5 in the movie, you probably want the following behaviours:
·When selected, the button is highlighted
·When clicked, the button is highlighted in a different fashion
·When clicked, the movie jumps to the appropriate chapter
·When clicked, the menu disappears
All these are possible simply by creating a button with a style of DefaultButton that points to your Chapter graphic and belongs to the classes HighlightButton, ChapterJumpButton, and CloseMenuButton. For example:
<button id="Chapter1" style="DefaultButton"
class="HighlightButton ChapterJumpButton CloseMenuButton"
The sample contains the following built-in classes, with the associated behaviour. They are all defined in the common include file BuiltInFunctions.xts. Basically each class has a simple animation associated with it that fires an event to script with the same name as the class, minus the "Button" bit.
A HighlightButton is one that will animate when focused or actioned. It assumes that the button has three backgroundImage frames, with frame 0 = normal state, frame 1 = focused state, and frame 2 = actioned state. If the "normal" state of your button is already baked into your menu's background image, you can simply use a 1 x 1 pixel transparent PNG for your "normal" state. This class does not fire an event since there is nothing to do.
A TitleJumpButton is one that will jump to a new title when actioned. The id of the button must match the id of the title in the playlist, so, for example, to jump to the "Making Of" documentary you would give both the Title and the button an id of "MakingOf" and make the button a member of the TitleJumpButton class.
A ChapterJumpButton is similar to a TitleJumpButton, but it jumps to a chapter in the main movie title (by default, this is the title with the id of "MainMovie", but you can change that). The button's id should be set to ChapterX, where X is a number from 1 to n and designates the chapter to jump to.
A PageJumpButton is similar to a TitleJumpButton, but jumps to another menu page. The id of the button must match the filename of the menu, sans the extension. So, for example, to launch the markup page "SpecialFeatures.xmu" you would have a button with an id of "SpecialFeatures" and give it a class of PageJumpButton.
A CloseMenuButton does just that -- it closes (hides) the menu and removes focus from everything. The user can also press the Menu or Top Menu button on their remote to hide the menu. When they click the button again, the most recent menu page will re-appear.
A ResumeMovieButton resumes the main movie (again, the one by default named "MainMovie") from where you left off. This is less useful in HD DVD since (by default) the movie continues to run while the movie is playing, but it can be useful if you want to do the equivalent of "motion menus" by temporarily switching to a different title while inside the menu system. It is also used in the demo to resume the main movie from the "Special Features".
The resume point is automatically tracked by the script; you don't need to do that yourself.
No points for guessing what this one does...
The script is very basic. It has a set of event handlers that listen to the events defined above, and then does the bare minimum processing required in order to carry out the command. For example, to jump chapters it strips the text "Chapter" from the id, parses the rest as an integer, subtracts one from it (to get a zero-based index) and then jumps to that chapter.
It also has a basic controller_key_down handler to show / hide the menu when the Menu or Top Menu buttons are pressed on the remote (simulated with Ctrl + M in iHDSim, unless you have a USB keyboard...).
Room for Improvement
Obviously this really is the bare-bones needed to get a menu up and running for a title. There is a lot of room for improvement here, either by providing more default behaviours (example: when you go to the Chapters menu, give focus to the currently-selected chapter) or for simply finessing the animations. I leave that as an exercise for the reader...
And, as part of a time-tested copy-protection scheme, I have made the graphics in the download so annoyingly ugly that nobody would want to actually use them 🙂