def __init__(self, *args, **kwargs): self.cptloc = kwargs.get('captcha') i = 0 u = 0 pos = [] bg_image = 'special://home/addons/plugin.video.vstream/resources/art/background.png' check_image = 'special://home/addons/plugin.video.vstream/resources/art/trans_checked.png' self.ctrlBackground = xbmcgui.ControlImage(0, 0, 1280, 720, bg_image) self.cancelled = False self.addControl(self.ctrlBackground) self.img = [0] * 6 for img in self.cptloc: self.img[i] = xbmcgui.ControlImage(u, 400, 250, 200, img) self.addControl(self.img[i]) i = i + 1 pos.append(u) u = u + 250 self.img[5] = xbmcgui.ControlImage(500, 0, 300, 400, kwargs.get('challenge')) self.addControl(self.img[5]) self.chk = [0] * 5 self.chkbutton = [0] * 5 self.chkstate = [False] * 5 i = 0 while i < 5: if 1 == 2: self.chk[i] = xbmcgui.ControlCheckMark( pos[i], 400, 250, 200, str(i + 1), font='font14', focusTexture=check_image, checkWidth=260, checkHeight=166) else: self.chk[i] = xbmcgui.ControlImage(pos[i], 400, 250, 200, check_image) self.chkbutton[i] = xbmcgui.ControlButton(pos[i], 400, 250, 200, str(i + 1), font='font1') i = i + 1 for obj in self.chk: self.addControl(obj) obj.setVisible(False) for obj in self.chkbutton: self.addControl(obj) self.cancelbutton = xbmcgui.ControlButton(250 + 260 - 70, 620, 140, 50, 'Cancel', alignment=2) self.okbutton = xbmcgui.ControlButton(250 + 520 - 50, 620, 100, 50, 'OK', alignment=2) self.addControl(self.okbutton) self.addControl(self.cancelbutton) self.chkbutton[0].controlDown(self.cancelbutton) self.cancelbutton.controlUp(self.chkbutton[0]) self.chkbutton[1].controlDown(self.cancelbutton) self.okbutton.controlUp(self.chkbutton[4]) self.chkbutton[2].controlDown(self.okbutton) self.chkbutton[3].controlDown(self.okbutton) self.chkbutton[4].controlDown(self.okbutton) self.chkbutton[0].controlLeft(self.chkbutton[4]) self.chkbutton[0].controlRight(self.chkbutton[1]) self.chkbutton[1].controlLeft(self.chkbutton[0]) self.chkbutton[1].controlRight(self.chkbutton[2]) self.chkbutton[2].controlLeft(self.chkbutton[1]) self.chkbutton[2].controlRight(self.chkbutton[3]) self.chkbutton[3].controlLeft(self.chkbutton[2]) self.chkbutton[3].controlRight(self.chkbutton[4]) self.chkbutton[4].controlLeft(self.chkbutton[3]) self.chkbutton[4].controlRight(self.chkbutton[0]) self.cancelled = False self.setFocus(self.okbutton) self.okbutton.controlLeft(self.cancelbutton) self.okbutton.controlRight(self.cancelbutton) self.cancelbutton.controlLeft(self.okbutton) self.cancelbutton.controlRight(self.okbutton) self.okbutton.controlDown(self.chkbutton[4]) self.okbutton.controlUp(self.chkbutton[4]) self.cancelbutton.controlDown(self.chkbutton[0]) self.cancelbutton.controlUp(self.chkbutton[0])
def __init__(self, *args, **kwargs): self.cptloc = kwargs.get('captcha') self.img = xbmcgui.ControlImage(335, 200, 624, 400, "") xbmc.sleep(500) self.img = xbmcgui.ControlImage(335, 200, 624, 400, self.cptloc) xbmc.sleep(500) bg_image = os.path.join(__addon__.getAddonInfo('path'), 'resources/art/') + "background.png" check_image = os.path.join(__addon__.getAddonInfo('path'), 'resources/art/') + "trans_checked.png" self.ctrlBackgound = xbmcgui.ControlImage(0, 0, 1280, 720, bg_image) self.cancelled = False self.addControl(self.ctrlBackgound) self.msg = kwargs.get( 'msg') + '\nNormalement il devrai y avoir en 3 ou 4 selection' self.roundnum = kwargs.get('roundnum') self.strActionInfo = xbmcgui.ControlLabel(335, 120, 700, 300, "Le theme est : " + self.msg, 'font13', '0xFFFF00FF') self.addControl(self.strActionInfo) self.strActionInfo = xbmcgui.ControlLabel( 335, 20, 724, 400, 'Veuillez selectionnez les images correpondants au themes', 'font40', '0xFFFF00FF') self.addControl(self.strActionInfo) self.addControl(self.img) self.chk = [0] * 9 self.chkbutton = [0] * 9 self.chkstate = [False] * 9 if 1 == 2: self.chk[0] = xbmcgui.ControlCheckMark(335, 190, 220, 150, '1', font='font14', focusTexture=check_image, checkWidth=220, checkHeight=150) self.chk[1] = xbmcgui.ControlCheckMark(335 + 200, 190, 220, 150, '2', font='font14', focusTexture=check_image, checkWidth=220, checkHeight=150) self.chk[2] = xbmcgui.ControlCheckMark(335 + 400, 190, 220, 150, '3', font='font14', focusTexture=check_image, checkWidth=220, checkHeight=150) self.chk[3] = xbmcgui.ControlCheckMark(335, 190 + 130, 220, 150, '4', font='font14', focusTexture=check_image, checkWidth=220, checkHeight=150) self.chk[4] = xbmcgui.ControlCheckMark(335 + 200, 190 + 130, 220, 150, '5', font='font14', focusTexture=check_image, checkWidth=220, checkHeight=150) self.chk[5] = xbmcgui.ControlCheckMark(335 + 400, 190 + 130, 220, 150, '6', font='font14', focusTexture=check_image, checkWidth=220, checkHeight=150) self.chk[6] = xbmcgui.ControlCheckMark(335, 190 + 260, 220, 150, '7', font='font14', focusTexture=check_image, checkWidth=220, checkHeight=150) self.chk[7] = xbmcgui.ControlCheckMark(335 + 200, 190 + 260, 220, 150, '8', font='font14', focusTexture=check_image, checkWidth=220, checkHeight=150) self.chk[8] = xbmcgui.ControlCheckMark(335 + 400, 190 + 260, 220, 150, '9', font='font14', focusTexture=check_image, checkWidth=220, checkHeight=150) else: self.chk[0] = xbmcgui.ControlImage(335, 190, 220, 150, check_image) self.chk[1] = xbmcgui.ControlImage(335 + 200, 190, 220, 150, check_image) self.chk[2] = xbmcgui.ControlImage(335 + 400, 190, 220, 150, check_image) self.chk[3] = xbmcgui.ControlImage(335, 190 + 130, 220, 150, check_image) self.chk[4] = xbmcgui.ControlImage(335 + 200, 190 + 130, 220, 150, check_image) self.chk[5] = xbmcgui.ControlImage(335 + 400, 190 + 130, 220, 150, check_image) self.chk[6] = xbmcgui.ControlImage(335, 190 + 260, 220, 150, check_image) self.chk[7] = xbmcgui.ControlImage(335 + 200, 190 + 260, 220, 150, check_image) self.chk[8] = xbmcgui.ControlImage(335 + 400, 190 + 260, 220, 150, check_image) self.chkbutton[0] = xbmcgui.ControlButton(335, 190, 210, 150, '1', font='font1') self.chkbutton[1] = xbmcgui.ControlButton(335 + 200, 190, 220, 150, '2', font='font1') self.chkbutton[2] = xbmcgui.ControlButton(335 + 400, 190, 220, 150, '3', font='font1') self.chkbutton[3] = xbmcgui.ControlButton(335, 190 + 130, 210, 150, '4', font='font1') self.chkbutton[4] = xbmcgui.ControlButton(335 + 200, 190 + 130, 220, 150, '5', font='font1') self.chkbutton[5] = xbmcgui.ControlButton(335 + 400, 190 + 130, 220, 150, '6', font='font1') self.chkbutton[6] = xbmcgui.ControlButton(335, 190 + 260, 210, 150, '7', font='font1') self.chkbutton[7] = xbmcgui.ControlButton(335 + 200, 190 + 260, 220, 150, '8', font='font1') self.chkbutton[8] = xbmcgui.ControlButton(335 + 400, 190 + 260, 220, 150, '9', font='font1') for obj in self.chk: self.addControl(obj) obj.setVisible(False) for obj in self.chkbutton: self.addControl(obj) self.cancelbutton = xbmcgui.ControlButton(335 + 312 - 100, 610, 100, 40, 'Cancel', alignment=2) self.okbutton = xbmcgui.ControlButton(335 + 312 + 50, 610, 100, 40, 'OK', alignment=2) self.addControl(self.okbutton) self.addControl(self.cancelbutton) self.chkbutton[6].controlDown(self.cancelbutton) self.chkbutton[6].controlUp(self.chkbutton[3]) self.chkbutton[7].controlDown(self.cancelbutton) self.chkbutton[7].controlUp(self.chkbutton[4]) self.chkbutton[8].controlDown(self.okbutton) self.chkbutton[8].controlUp(self.chkbutton[5]) self.chkbutton[6].controlLeft(self.chkbutton[8]) self.chkbutton[6].controlRight(self.chkbutton[7]) self.chkbutton[7].controlLeft(self.chkbutton[6]) self.chkbutton[7].controlRight(self.chkbutton[8]) self.chkbutton[8].controlLeft(self.chkbutton[7]) self.chkbutton[8].controlRight(self.chkbutton[6]) self.chkbutton[3].controlDown(self.chkbutton[6]) self.chkbutton[3].controlUp(self.chkbutton[0]) self.chkbutton[4].controlDown(self.chkbutton[7]) self.chkbutton[4].controlUp(self.chkbutton[1]) self.chkbutton[5].controlDown(self.chkbutton[8]) self.chkbutton[5].controlUp(self.chkbutton[2]) self.chkbutton[3].controlLeft(self.chkbutton[5]) self.chkbutton[3].controlRight(self.chkbutton[4]) self.chkbutton[4].controlLeft(self.chkbutton[3]) self.chkbutton[4].controlRight(self.chkbutton[5]) self.chkbutton[5].controlLeft(self.chkbutton[4]) self.chkbutton[5].controlRight(self.chkbutton[3]) self.chkbutton[0].controlDown(self.chkbutton[3]) self.chkbutton[0].controlUp(self.cancelbutton) self.chkbutton[1].controlDown(self.chkbutton[4]) self.chkbutton[1].controlUp(self.cancelbutton) self.chkbutton[2].controlDown(self.chkbutton[5]) self.chkbutton[2].controlUp(self.okbutton) self.chkbutton[0].controlLeft(self.chkbutton[2]) self.chkbutton[0].controlRight(self.chkbutton[1]) self.chkbutton[1].controlLeft(self.chkbutton[0]) self.chkbutton[1].controlRight(self.chkbutton[2]) self.chkbutton[2].controlLeft(self.chkbutton[1]) self.chkbutton[2].controlRight(self.chkbutton[0]) self.cancelled = False self.setFocus(self.okbutton) self.okbutton.controlLeft(self.cancelbutton) self.okbutton.controlRight(self.cancelbutton) self.cancelbutton.controlLeft(self.okbutton) self.cancelbutton.controlRight(self.okbutton) self.okbutton.controlDown(self.chkbutton[2]) self.okbutton.controlUp(self.chkbutton[8]) self.cancelbutton.controlDown(self.chkbutton[0]) self.cancelbutton.controlUp(self.chkbutton[6])
def __init__(self, *args, **kwargs): self.cptloc = kwargs.get('captcha') # self.img = xbmcgui.ControlImage(250, 110, 780, 499, '') # xbmc.sleep(500) self.img = xbmcgui.ControlImage(250, 110, 780, 499, self.cptloc) xbmc.sleep(500) bg_image = os.path.join( __addon__.getAddonInfo('path'), 'resources/art/' ) + 'background.png' check_image = os.path.join( __addon__.getAddonInfo('path'), 'resources/art/' ) + 'trans_checked.png' self.ctrlBackgound = xbmcgui.ControlImage(0, 0, 1280, 720, bg_image) self.cancelled = False self.addControl (self.ctrlBackgound) self.strActionInfo = xbmcgui.ControlLabel(250, 20, 724, 400, 'Veuillez sélectionnez les images correspondants au thème.\nIl devrait y en avoir 3 ou 4 à sélectionner.', 'font40', '0xFFFF00FF') self.addControl(self.strActionInfo) self.msg = kwargs.get('msg') self.roundnum = kwargs.get('roundnum') self.strActionInfo = xbmcgui.ControlLabel(250, 70, 700, 300, 'Le thème est: ' + self.msg, 'font13', '0xFFFF00FF') self.addControl(self.strActionInfo) self.addControl(self.img) self.chk = [0]*9 self.chkbutton = [0]*9 self.chkstate = [False]*9 if 1 == 2: self.chk[0]= xbmcgui.ControlCheckMark(250, 110, 260, 166, '1', font = 'font14', focusTexture = check_image, checkWidth = 260, checkHeight = 166) self.chk[1]= xbmcgui.ControlCheckMark(250 + 260, 110, 260, 166, '2', font = 'font14', focusTexture = check_image, checkWidth = 260, checkHeight = 166) self.chk[2]= xbmcgui.ControlCheckMark(250 + 520, 110, 260, 166, '3', font = 'font14', focusTexture = check_image, checkWidth = 260, checkHeight = 166) self.chk[3]= xbmcgui.ControlCheckMark(250, 110 + 166, 260, 166, '4', font = 'font14', focusTexture = check_image, checkWidth = 260, checkHeight = 166) self.chk[4]= xbmcgui.ControlCheckMark(250 + 260, 110 + 166, 260, 166, '5', font = 'font14', focusTexture = check_image, checkWidth = 260, checkHeight = 166) self.chk[5]= xbmcgui.ControlCheckMark(250 + 520, 110 + 166, 260, 166, '6', font = 'font14', focusTexture = check_image, checkWidth = 260, checkHeight = 166) self.chk[6]= xbmcgui.ControlCheckMark(250, 110 + 332, 260, 166, '7', font = 'font14', focusTexture = check_image, checkWidth = 260, checkHeight = 166) self.chk[7]= xbmcgui.ControlCheckMark(250 + 260, 110 + 332, 260, 166, '8', font = 'font14', focusTexture = check_image, checkWidth = 260, checkHeight = 166) self.chk[8]= xbmcgui.ControlCheckMark(250 + 520, 110 + 332, 260, 166, '9', font = 'font14', focusTexture = check_image, checkWidth = 260, checkHeight = 166) else: self.chk[0]= xbmcgui.ControlImage(250, 110, 260, 166, check_image) self.chk[1]= xbmcgui.ControlImage(250 + 260, 110, 260, 166, check_image) self.chk[2]= xbmcgui.ControlImage(250 + 520, 110, 260, 166, check_image) self.chk[3]= xbmcgui.ControlImage(250, 110 + 166, 260, 166, check_image) self.chk[4]= xbmcgui.ControlImage(250 + 260, 110 + 166, 260, 166, check_image) self.chk[5]= xbmcgui.ControlImage(250 + 520, 110 + 166, 260, 166, check_image) self.chk[6]= xbmcgui.ControlImage(250, 110 + 332, 260, 166, check_image) self.chk[7]= xbmcgui.ControlImage(250 + 260, 110 + 332, 260, 166, check_image) self.chk[8]= xbmcgui.ControlImage(250 + 520, 110 + 332, 260, 166, check_image) self.chkbutton[0]= xbmcgui.ControlButton(250, 110, 260, 166, '1', font = 'font1'); self.chkbutton[1]= xbmcgui.ControlButton(250 + 260, 110, 260, 166, '2', font = 'font1'); self.chkbutton[2]= xbmcgui.ControlButton(250 + 520, 110, 260, 166, '3', font = 'font1'); self.chkbutton[3]= xbmcgui.ControlButton(250, 110 + 166, 260, 166, '4', font = 'font1'); self.chkbutton[4]= xbmcgui.ControlButton(250 + 260, 110 + 166, 260, 166, '5', font = 'font1'); self.chkbutton[5]= xbmcgui.ControlButton(250 + 520, 110 + 166, 260, 166, '6', font = 'font1'); self.chkbutton[6]= xbmcgui.ControlButton(250, 110 + 332, 260, 166, '7', font = 'font1'); self.chkbutton[7]= xbmcgui.ControlButton(250 + 260, 110 + 332, 260, 166, '8', font = 'font1'); self.chkbutton[8]= xbmcgui.ControlButton(250 + 520, 110 + 332, 260, 166, '9', font = 'font1'); for obj in self.chk: self.addControl(obj) obj.setVisible(False) for obj in self.chkbutton: self.addControl(obj) self.cancelbutton = xbmcgui.ControlButton(250 + 260 - 70, 620, 140, 50, 'Cancel', alignment = 2) self.okbutton = xbmcgui.ControlButton(250 + 520 - 50, 620, 100, 50, 'OK', alignment = 2) self.addControl(self.okbutton) self.addControl(self.cancelbutton) self.chkbutton[6].controlDown(self.cancelbutton); self.chkbutton[6].controlUp(self.chkbutton[3]) self.chkbutton[7].controlDown(self.cancelbutton); self.chkbutton[7].controlUp(self.chkbutton[4]) self.chkbutton[8].controlDown(self.okbutton); self.chkbutton[8].controlUp(self.chkbutton[5]) self.chkbutton[6].controlLeft(self.chkbutton[8]); self.chkbutton[6].controlRight(self.chkbutton[7]); self.chkbutton[7].controlLeft(self.chkbutton[6]); self.chkbutton[7].controlRight(self.chkbutton[8]); self.chkbutton[8].controlLeft(self.chkbutton[7]); self.chkbutton[8].controlRight(self.chkbutton[6]); self.chkbutton[3].controlDown(self.chkbutton[6]); self.chkbutton[3].controlUp(self.chkbutton[0]) self.chkbutton[4].controlDown(self.chkbutton[7]); self.chkbutton[4].controlUp(self.chkbutton[1]) self.chkbutton[5].controlDown(self.chkbutton[8]); self.chkbutton[5].controlUp(self.chkbutton[2]) self.chkbutton[3].controlLeft(self.chkbutton[5]); self.chkbutton[3].controlRight(self.chkbutton[4]); self.chkbutton[4].controlLeft(self.chkbutton[3]); self.chkbutton[4].controlRight(self.chkbutton[5]); self.chkbutton[5].controlLeft(self.chkbutton[4]); self.chkbutton[5].controlRight(self.chkbutton[3]); self.chkbutton[0].controlDown(self.chkbutton[3]); self.chkbutton[0].controlUp(self.cancelbutton) self.chkbutton[1].controlDown(self.chkbutton[4]); self.chkbutton[1].controlUp(self.cancelbutton) self.chkbutton[2].controlDown(self.chkbutton[5]); self.chkbutton[2].controlUp(self.okbutton) self.chkbutton[0].controlLeft(self.chkbutton[2]); self.chkbutton[0].controlRight(self.chkbutton[1]); self.chkbutton[1].controlLeft(self.chkbutton[0]); self.chkbutton[1].controlRight(self.chkbutton[2]); self.chkbutton[2].controlLeft(self.chkbutton[1]); self.chkbutton[2].controlRight(self.chkbutton[0]); self.cancelled = False self.setFocus(self.okbutton) self.okbutton.controlLeft(self.cancelbutton); self.okbutton.controlRight(self.cancelbutton); self.cancelbutton.controlLeft(self.okbutton); self.cancelbutton.controlRight(self.okbutton); self.okbutton.controlDown(self.chkbutton[2]); self.okbutton.controlUp(self.chkbutton[8]); self.cancelbutton.controlDown(self.chkbutton[0]); self.cancelbutton.controlUp(self.chkbutton[6]);
def __init__(self, *args, **kwargs): self.cptloc = kwargs.get('captcha') i = 0 u = 0 pos = [] bg_image = 'special://home/addons/plugin.video.vstream/resources/art/background.png' check_image = 'special://home/addons/plugin.video.vstream/resources/art/trans_checked.png' self.ctrlBackground = xbmcgui.ControlImage(0, 0, 1280, 720, bg_image) self.cancelled = False self.addControl(self.ctrlBackground) self.img = [0] * 10 self.strActionInfo = xbmcgui.ControlLabel( 250, 20, 724, 400, 'Veuillez sélectionnez l\'image qui ressemble le plus \n a l\'image qui se trouve le plus a gauche.', 'font40', '0xFFFF00FF') self.addControl(self.strActionInfo) self.img[0] = xbmcgui.ControlImage(450, 110, 260, 166, self.cptloc[0]) self.addControl(self.img[0]) self.img[1] = xbmcgui.ControlImage(450 + 260, 110, 260, 166, self.cptloc[1]) self.addControl(self.img[1]) self.img[2] = xbmcgui.ControlImage(450 + 520, 110, 260, 166, self.cptloc[2]) self.addControl(self.img[2]) self.img[3] = xbmcgui.ControlImage(450, 110 + 166, 260, 166, self.cptloc[3]) self.addControl(self.img[3]) self.img[4] = xbmcgui.ControlImage(450 + 260, 110 + 166, 260, 166, self.cptloc[4]) self.addControl(self.img[4]) self.img[5] = xbmcgui.ControlImage(450 + 520, 110 + 166, 260, 166, self.cptloc[5]) self.addControl(self.img[5]) self.img[6] = xbmcgui.ControlImage(450, 110 + 332, 260, 166, self.cptloc[6]) self.addControl(self.img[6]) self.img[7] = xbmcgui.ControlImage(450 + 260, 110 + 332, 260, 166, self.cptloc[7]) self.addControl(self.img[7]) self.img[8] = xbmcgui.ControlImage(450 + 520, 110 + 332, 260, 166, self.cptloc[8]) self.addControl(self.img[8]) self.img[9] = xbmcgui.ControlImage(100, 80, 260, 166, kwargs.get('challenge')) self.addControl(self.img[9]) self.chk = [0] * 9 self.chkbutton = [0] * 9 self.chkstate = [False] * 9 if 1 == 2: self.chk[0] = xbmcgui.ControlCheckMark(450, 110, 260, 166, '1', font='font14', focusTexture=check_image, checkWidth=260, checkHeight=166) self.chk[1] = xbmcgui.ControlCheckMark(450 + 260, 110, 260, 166, '2', font='font14', focusTexture=check_image, checkWidth=260, checkHeight=166) self.chk[2] = xbmcgui.ControlCheckMark(450 + 520, 110, 260, 166, '3', font='font14', focusTexture=check_image, checkWidth=260, checkHeight=166) self.chk[3] = xbmcgui.ControlCheckMark(450, 110 + 166, 260, 166, '4', font='font14', focusTexture=check_image, checkWidth=260, checkHeight=166) self.chk[4] = xbmcgui.ControlCheckMark(450 + 260, 110 + 166, 260, 166, '5', font='font14', focusTexture=check_image, checkWidth=260, checkHeight=166) self.chk[5] = xbmcgui.ControlCheckMark(450 + 520, 110 + 166, 260, 166, '6', font='font14', focusTexture=check_image, checkWidth=260, checkHeight=166) self.chk[6] = xbmcgui.ControlCheckMark(450, 110 + 332, 260, 166, '7', font='font14', focusTexture=check_image, checkWidth=260, checkHeight=166) self.chk[7] = xbmcgui.ControlCheckMark(450 + 260, 110 + 332, 260, 166, '8', font='font14', focusTexture=check_image, checkWidth=260, checkHeight=166) self.chk[8] = xbmcgui.ControlCheckMark(450 + 520, 110 + 332, 260, 166, '9', font='font14', focusTexture=check_image, checkWidth=260, checkHeight=166) else: self.chk[0] = xbmcgui.ControlImage(450, 110, 260, 166, check_image) self.chk[1] = xbmcgui.ControlImage(450 + 260, 110, 260, 166, check_image) self.chk[2] = xbmcgui.ControlImage(450 + 520, 110, 260, 166, check_image) self.chk[3] = xbmcgui.ControlImage(450, 110 + 166, 260, 166, check_image) self.chk[4] = xbmcgui.ControlImage(450 + 260, 110 + 166, 260, 166, check_image) self.chk[5] = xbmcgui.ControlImage(450 + 520, 110 + 166, 260, 166, check_image) self.chk[6] = xbmcgui.ControlImage(450, 110 + 332, 260, 166, check_image) self.chk[7] = xbmcgui.ControlImage(450 + 260, 110 + 332, 260, 166, check_image) self.chk[8] = xbmcgui.ControlImage(450 + 520, 110 + 332, 260, 166, check_image) self.chkbutton[0] = xbmcgui.ControlButton(450, 110, 260, 166, '1', font='font1') self.chkbutton[1] = xbmcgui.ControlButton(450 + 260, 110, 260, 166, '2', font='font1') self.chkbutton[2] = xbmcgui.ControlButton(450 + 520, 110, 260, 166, '3', font='font1') self.chkbutton[3] = xbmcgui.ControlButton(450, 110 + 166, 260, 166, '4', font='font1') self.chkbutton[4] = xbmcgui.ControlButton(450 + 260, 110 + 166, 260, 166, '5', font='font1') self.chkbutton[5] = xbmcgui.ControlButton(450 + 520, 110 + 166, 260, 166, '6', font='font1') self.chkbutton[6] = xbmcgui.ControlButton(450, 110 + 332, 260, 166, '7', font='font1') self.chkbutton[7] = xbmcgui.ControlButton(450 + 260, 110 + 332, 260, 166, '8', font='font1') self.chkbutton[8] = xbmcgui.ControlButton(450 + 520, 110 + 332, 260, 166, '9', font='font1') for obj in self.chk: self.addControl(obj) obj.setVisible(False) for obj in self.chkbutton: self.addControl(obj) self.cancelbutton = xbmcgui.ControlButton(250 + 260 - 70, 620, 140, 50, 'Cancel', alignment=2) self.okbutton = xbmcgui.ControlButton(250 + 520 - 50, 620, 100, 50, 'OK', alignment=2) self.addControl(self.okbutton) self.addControl(self.cancelbutton) self.chkbutton[6].controlDown(self.cancelbutton) self.chkbutton[6].controlUp(self.chkbutton[3]) self.chkbutton[7].controlDown(self.cancelbutton) self.chkbutton[7].controlUp(self.chkbutton[4]) self.chkbutton[8].controlDown(self.okbutton) self.chkbutton[8].controlUp(self.chkbutton[5]) self.chkbutton[6].controlLeft(self.chkbutton[8]) self.chkbutton[6].controlRight(self.chkbutton[7]) self.chkbutton[7].controlLeft(self.chkbutton[6]) self.chkbutton[7].controlRight(self.chkbutton[8]) self.chkbutton[8].controlLeft(self.chkbutton[7]) self.chkbutton[8].controlRight(self.chkbutton[6]) self.chkbutton[3].controlDown(self.chkbutton[6]) self.chkbutton[3].controlUp(self.chkbutton[0]) self.chkbutton[4].controlDown(self.chkbutton[7]) self.chkbutton[4].controlUp(self.chkbutton[1]) self.chkbutton[5].controlDown(self.chkbutton[8]) self.chkbutton[5].controlUp(self.chkbutton[2]) self.chkbutton[3].controlLeft(self.chkbutton[5]) self.chkbutton[3].controlRight(self.chkbutton[4]) self.chkbutton[4].controlLeft(self.chkbutton[3]) self.chkbutton[4].controlRight(self.chkbutton[5]) self.chkbutton[5].controlLeft(self.chkbutton[4]) self.chkbutton[5].controlRight(self.chkbutton[3]) self.chkbutton[0].controlDown(self.chkbutton[3]) self.chkbutton[0].controlUp(self.cancelbutton) self.chkbutton[1].controlDown(self.chkbutton[4]) self.chkbutton[1].controlUp(self.cancelbutton) self.chkbutton[2].controlDown(self.chkbutton[5]) self.chkbutton[2].controlUp(self.okbutton) self.chkbutton[0].controlLeft(self.chkbutton[2]) self.chkbutton[0].controlRight(self.chkbutton[1]) self.chkbutton[1].controlLeft(self.chkbutton[0]) self.chkbutton[1].controlRight(self.chkbutton[2]) self.chkbutton[2].controlLeft(self.chkbutton[1]) self.chkbutton[2].controlRight(self.chkbutton[0]) self.cancelled = False self.setFocus(self.okbutton) self.okbutton.controlLeft(self.cancelbutton) self.okbutton.controlRight(self.cancelbutton) self.cancelbutton.controlLeft(self.okbutton) self.cancelbutton.controlRight(self.okbutton) self.okbutton.controlDown(self.chkbutton[2]) self.okbutton.controlUp(self.chkbutton[8]) self.cancelbutton.controlDown(self.chkbutton[0]) self.cancelbutton.controlUp(self.chkbutton[6])