Change button highlight

Jey wrote on 9/27/2006, 5:00 AM
Hi.
I'm rebuilding a project I made in Scenarist to get to know DVD Architect.
The workflow is very different, but very 'Vegas-like'.
There's one thing I can't get thru, so I hope someone can help me out here.

I've created a chapter menu with 15 buttons. 1 button links to the main menu, the other 14 refer to the 14 chapters in the movie. When the movie is finished or you press the 'menu' button, I'd like the dvd to return to the chapter menu and highlight the button of the last played chapter.
In Scenarist you've to use the SPRM7 for that (and some comparisons), but how can I do this in DVDA?
When returning to the menu it highlights the 'default button'. How to set this? Or how to set the highlight by scripting?

Thanks in advance for any help!

Comments

ECB wrote on 9/27/2006, 7:13 AM
Yes, you can do it with script. I assume that when you select a chapter the movie will play from that chapter to the end of the movie.

Let me get you started . Set each chapter button to link to a script
GPRM0 =1
Link Title 'Movie', Chapter :'1; Scene/Chapter"

Set GPRM0 to the value for each chapter number and link to the correct chapter.

When the movie ends or you hit menu on the remote have it link to this script

If(GPRM = 1) then linkpage : 'Scene Selection', button: '1: Link -DVD Script 1'

Enter a link statement for each chapter button script but the last and last can be an unconditional link to the last chapter button script.

I tried a sample and it worked. If you have a trouble I will try and help.

Ed




GeorgeW wrote on 9/27/2006, 8:23 AM
I think (not sure) the OP wants the ability to highlight a button based on the last/current playing chapter (i.e. you could jump to chapter 2, but it plays to chapter 5, then hitting the menu button would highlight button 5). If that is the desired action, then you could add the following command to the TOP of the DVD Script that Ed pointed out:

Have the menu chapter buttons link directly to the scene/chapter

Then the END ACTION (or MENU Button) links to a DVD Script that looks something like this:

GPRM0 = SPRM7[Chapter]
If(GPRM0 = 1) then linkpage : 'Scene Selection', button: '1: Link -VTS 01 1'
If(GPRM0 = 2) then linkpage : 'Scene Selection', button: '2: Link -VTS 01 1 (2:Scene/Chapter)'
.
.
.


EDIT: The PGCedit download page has a utility to check your DVD Player's setting of SPRM7 -- the text for the download is as follows:

"Download the Test-SPRM-7 tiny DVD, used to check if your player holds the PTT (chapter) number or the Program number in SPRM 7. (This test DVD is useful to setup the virtual player for Trace mode)."
ScottW wrote on 9/27/2006, 8:56 AM
You know, this would be one heck of a lot easier if some of the GPRM's used by the DVDA abstraction layer were made available as read only. For example, it appears that GPRM2 is used to contain the chapter number selected from a scene selection menu. This information alone would allow one to avoid creating as many scripts as you have chapters for.

Oh, by the way, GPRM0 in DVDA does not map to GPRM0 in the underlying DVD.

GPRM0 => GPRM7
:
GPRM5 => GPRM12
ECB wrote on 9/27/2006, 9:20 AM
IMO all of the GPRMs are psuedo regs for users's use only and do not map to the DVD GPRM registers.

" For example, it appears that GPRM2 is used to contain the chapter number selected from a scene selection menu"

I ran a simple script under a button which set GMRM2 = 6000 and linked to menu 1. I ran in Preview script debug mode with a movie and scene selection menu. I selected the script button and GPRM2 was set to 6000. I selected several chapters in the scene selection menu and GPRM2 reamined unchanged.

Ed

ScottW wrote on 9/27/2006, 9:25 AM
I guess I wasn't very clear. GPRM2 as used by the abstraction layer, is not accessable from a DVDA script; GPRM2 as used in a script is mapped to actual GPRM9. I'm just pointing this out for folks that may use PGCedit or IFOedit.

It would be nice if some of the GPRM's used by the abstraction layer were mapped to something read-only, for example, in script:

GPRM0 = SelectedChapter

Anyway, I'll probably be sticking to DLP for any serious scripting.

--Scott
ECB wrote on 9/27/2006, 9:46 AM
I agree, if you try and map the user script into PCGEdit... you need to know DVDA abstration layer. IMO having the GPRMs independant from the DVD GPRMs gives the user total control over the regs with the ability to pass variables between scripts without any external changes.

Ed
Jey wrote on 10/2/2006, 2:48 AM
Thanks!
This is what I wanted to happen. When I saw the script it looked a bit un-obvious to me, but it works like a charm!
I really have to get used to programming with the abstraction layer.
Thanks again!

Jey