def init():
	global cont, own, obj_list, options_items, mouse_move, mouse_over, mouse_click, enter_key, up_key, down_key, all_keys, back_key, right_click
	cont = logic.getCurrentController()
	own = cont.owner

	obj_list = logic.getCurrentScene().objects
	film_option = logic.getCurrentScene().objects['film_option']
	
	options_items = []

	for ob in obj_list:
		if 'ID' in ob:
			options_items.append(ob)
			#print (options_items)
	
	include_film = xml_parse.readXML('menu.xml', ['include_film'], False)
	if include_film == 'False':
		film_option['selectable'] = False
		for i in film_option.children:
			i.visible = 0
		options_items.pop()
	else:
		pass
	
	mouse_move = own.sensors['mouse_move']
	mouse_over = own.sensors['mouse_over']
	mouse_click = own.sensors['mouse_click']
	right_click = own.sensors['right_click']
	enter_key = own.sensors['enter_key']
	back_key = own.sensors['back_key']
	up_key = own.sensors['up_key']
	down_key = own.sensors['down_key']
Exemple #2
0
def set_app_ver():
	#get the whole xml file
	menu_xml = xml_parse.readXML('menu.xml', False, False)

	version_text = logic.getCurrentScene().objects['version_text']
	notice_text = logic.getCurrentScene().objects['notice_text']

	resume_game = logic.getCurrentScene().objects['resume_option']
	new_game = logic.getCurrentScene().objects['new_game_option']
	extras_option = logic.getCurrentScene().objects['extras_option']
	options_item = logic.getCurrentScene().objects['options_item']
	exit_option = logic.getCurrentScene().objects['exit_option']
	
	#set app version number
	app_version = menu_xml.find('version')
	version_text.text = app_version.text
	
	#set the notice text
	notice = menu_xml.find('notice')
	notice_text.text = notice.text
	
	#set menu button text
	resume = menu_xml.find('resume')
	resume_game['text'] = resume.text
	#so on
	new_game_text = menu_xml.find('new')
	new_game['text'] = new_game_text.text
	#and so forth
	extras = menu_xml.find('extra')
	extras_option['text'] = extras.text
	
	options = menu_xml.find('options')
	options_item['text'] = options.text
	
	exit = menu_xml.find('exit')
	exit_option['text'] = exit.text
	#start the music!
	menu_music.startSound()
	
	#if the sintel film is included
	include_film = menu_xml.find('include_film')
	
	if include_film.text =='True':
		logic.globalDict['include_film'] = True
	else:
		logic.globalDict['include_film'] = False
def set_app_ver():
    #get the whole xml file
    menu_xml = xml_parse.readXML('menu.xml', False, False)

    version_text = logic.getCurrentScene().objects['version_text']
    notice_text = logic.getCurrentScene().objects['notice_text']

    resume_game = logic.getCurrentScene().objects['resume_option']
    new_game = logic.getCurrentScene().objects['new_game_option']
    extras_option = logic.getCurrentScene().objects['extras_option']
    options_item = logic.getCurrentScene().objects['options_item']
    exit_option = logic.getCurrentScene().objects['exit_option']

    #set app version number
    app_version = menu_xml.find('version')
    version_text.text = app_version.text

    #set the notice text
    notice = menu_xml.find('notice')
    notice_text.text = notice.text

    #set menu button text
    resume = menu_xml.find('resume')
    resume_game['text'] = resume.text
    #so on
    new_game_text = menu_xml.find('new')
    new_game['text'] = new_game_text.text
    #and so forth
    extras = menu_xml.find('extra')
    extras_option['text'] = extras.text

    options = menu_xml.find('options')
    options_item['text'] = options.text

    exit = menu_xml.find('exit')
    exit_option['text'] = exit.text
    #start the music!
    menu_music.startSound()

    #if the sintel film is included
    include_film = menu_xml.find('include_film')

    if include_film.text == 'True':
        logic.globalDict['include_film'] = True
    else:
        logic.globalDict['include_film'] = False
def init():
    global credits_list
    credits_list = xml_parse.readXML('credits.xml', ['section'], True)
Exemple #5
0
def init():
	global credits_list
	credits_list = xml_parse.readXML('credits.xml', ['section'], True)