2004-02-18, 19:51
Quote:import xbmc, xbmcgui
dialog = xbmcgui.dialog()
list = ['kieren','nickname2','nickname3','nickname4', 'other...']
selected = dialog.select('rename xbox', list)
if selected != -1:
if selected == len(list)-1: list[selected] = 'osk'
if dialog.yesno('rename xbox', 'are you sure you want to rename your xbox', list[selected]):
nickname = open("e:\\udata\\nickname.xbn","w")
nickname.write('\x08\xe0\xac\x0f')
for character in list[selected]:
nickname.write(character + '\x00')
remainingbytes = range(0, 3400 - len(list[selected])*2 - 4)
for count in remainingbytes: nickname.write('\x00')
nickname.close()
is there or will there be any support for the on screen keyboard so i could add a custom names option to the above code?