First working version of 'Play All' option.Set 'Play All' menu option to off by default.TODO: Test
This commit is contained in:
parent
516ae862b4
commit
70c8a709b2
2 changed files with 26 additions and 8 deletions
|
|
@ -47,7 +47,7 @@ class dvd_menu(devedeng.interface_manager.interface_manager):
|
||||||
|
|
||||||
self.add_group("position_horizontal", ["left", "center", "right"], "center", self.update_preview)
|
self.add_group("position_horizontal", ["left", "center", "right"], "center", self.update_preview)
|
||||||
self.add_group("at_startup", ["menu_show_at_startup", "play_first_title_at_startup"], "menu_show_at_startup")
|
self.add_group("at_startup", ["menu_show_at_startup", "play_first_title_at_startup"], "menu_show_at_startup")
|
||||||
self.add_group("play_all", ["menu_play_all", "menu_no_play_all"], "menu_play_all", self.update_preview)
|
self.add_group("play_all", ["menu_play_all", "menu_no_play_all"], "menu_no_play_all", self.update_preview)
|
||||||
|
|
||||||
self.add_integer_adjustment("sound_length", 30)
|
self.add_integer_adjustment("sound_length", 30)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -94,11 +94,13 @@ class dvdauthor_converter(devedeng.executor.executor):
|
||||||
|
|
||||||
xml_file.write('\t\t<fpc>\n')
|
xml_file.write('\t\t<fpc>\n')
|
||||||
xml_file.write('\t\t\tg0=100;\n')
|
xml_file.write('\t\t\tg0=100;\n')
|
||||||
|
xml_file.write('\t\t\tg1=') #start with menu variable, although since this would be static is it needed?
|
||||||
if (menu_entries != None) and (start_with_menu):
|
if (menu_entries != None) and (start_with_menu):
|
||||||
xml_file.write('\t\t\tg1=0;\n')
|
xml_file.write('0;\n') #show menu
|
||||||
else:
|
else:
|
||||||
xml_file.write('\t\t\tg1=100;\n')
|
xml_file.write('100;\n') #auto play
|
||||||
xml_file.write('\t\t\tg2=1024;\n')
|
xml_file.write('\t\t\tg2=1024;\n') #highlight?
|
||||||
|
xml_file.write('\t\t\tg3=0;\n') #play all variable
|
||||||
xml_file.write('\t\t\tjump menu 1;\n')
|
xml_file.write('\t\t\tjump menu 1;\n')
|
||||||
xml_file.write('\t\t</fpc>\n')
|
xml_file.write('\t\t</fpc>\n')
|
||||||
|
|
||||||
|
|
@ -173,8 +175,8 @@ class dvdauthor_converter(devedeng.executor.executor):
|
||||||
for menu_page in menu_entries:
|
for menu_page in menu_entries:
|
||||||
xml_file.write('\t\t\t<pgc>\n')
|
xml_file.write('\t\t\t<pgc>\n')
|
||||||
xml_file.write('\t\t\t\t<pre>\n')
|
xml_file.write('\t\t\t\t<pre>\n')
|
||||||
# first we recover the currently selected button
|
xml_file.write('\t\t\t\t\ts8=g2;\n') # first we recover the currently selected button
|
||||||
xml_file.write('\t\t\t\t\ts8=g2;\n')
|
xml_file.write('\t\t\t\t\tg3=0;\n') #turnoff play all
|
||||||
|
|
||||||
if first_entry: # here we add some code to jump to each menu
|
if first_entry: # here we add some code to jump to each menu
|
||||||
for menu2 in range(nmenues-1):
|
for menu2 in range(nmenues-1):
|
||||||
|
|
@ -195,7 +197,14 @@ class dvdauthor_converter(devedeng.executor.executor):
|
||||||
xml_file.write('"></vob>\n')
|
xml_file.write('"></vob>\n')
|
||||||
|
|
||||||
for nbutton in menu_page["chapters"]:
|
for nbutton in menu_page["chapters"]:
|
||||||
xml_file.write('\t\t\t\t<button name="'+nbutton+'"> g0='+str(title_list[button_counter])+'; jump vmgm menu; </button>\n')
|
#xml_file.write('\t\t\t\t<button name="'+nbutton+'"> g0='+str(title_list[button_counter])+'; jump vmgm menu; </button>\n')
|
||||||
|
xml_file.write('\t\t\t\t<button name="'+nbutton+'">\n')
|
||||||
|
xml_file.write('\t\t\t\t\tg0='+str(title_list[button_counter])+';\n')
|
||||||
|
if play_all_opt and nbutton == "boton0x0":
|
||||||
|
xml_file.write('\t\t\t\t\tg3=1;\n')
|
||||||
|
xml_file.write('\t\t\t\t\tjump vmgm menu;\n')
|
||||||
|
xml_file.write('\t\t\t\t</button>\n')
|
||||||
|
if not play_all_opt:
|
||||||
button_counter+=1
|
button_counter+=1
|
||||||
|
|
||||||
if (menu_page["left"] != None):
|
if (menu_page["left"] != None):
|
||||||
|
|
@ -384,6 +393,15 @@ class dvdauthor_converter(devedeng.executor.executor):
|
||||||
xml_file.write('\t\t\t\t<post>\n')
|
xml_file.write('\t\t\t\t<post>\n')
|
||||||
files+=1
|
files+=1
|
||||||
xml_file.write('\t\t\t\t\tg1='+str(int(titles/elements_per_menu))+';\n')
|
xml_file.write('\t\t\t\t\tg1='+str(int(titles/elements_per_menu))+';\n')
|
||||||
|
|
||||||
|
xml_file.write('\t\t\t\t\tif (g3 eq 1) {\n') #if play all:
|
||||||
|
if titles==total_t-1: #return to menu if last title
|
||||||
|
xml_file.write('\t\t\t\t\t\tg0=100;\n')
|
||||||
|
xml_file.write('\t\t\t\t\t\tcall vmgm menu entry title;\n')
|
||||||
|
else: #play next title
|
||||||
|
xml_file.write('\t\t\t\t\tg0='+str(titles + 2))
|
||||||
|
xml_file.write('\t\t\t\t\t}\n')
|
||||||
|
|
||||||
if (action=="action_stop"):
|
if (action=="action_stop"):
|
||||||
xml_file.write('\t\t\t\t\tg0=100;\n')
|
xml_file.write('\t\t\t\t\tg0=100;\n')
|
||||||
xml_file.write('\t\t\t\t\tcall vmgm menu entry title;\n')
|
xml_file.write('\t\t\t\t\tcall vmgm menu entry title;\n')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue