2017-08-19, 19:16
Hi,
This code come from a game made in kodi it is a puzzle game.
I have understand this code that makes a vertical list of words in a controllist made in xbmcgui:
But i was not able to figure how to get the labels of the items that the users click on them in this list, so i can takes later actions to them
Can you guide me what to do ?
thanks
iLovePython2000
This code come from a game made in kodi it is a puzzle game.
I have understand this code that makes a vertical list of words in a controllist made in xbmcgui:
PHP Code:
l=1100-10; t=30; w=180; h=self.scr['H']-t-35;
self.HoroTxtBG=xbmcgui.ControlImage(l,t,w,h,self.b1,aspectRatio=0);
self.HoroTxtBG2=xbmcgui.ControlImage(l,t,w,h,nofocus,aspectRatio=0);
#self.HoroTxt=xbmcgui.ControlTextBox(l+10,t+2,w-20,h-4,font='font12',textColor="0xFF000000");
self.HoroTxt=xbmcgui.ControlList(l+5,t+20,w-10,h-40,font='font12',textColor="0xFF000000",selectedColor="0xFF000000",buttonFocusTexture=focus,buttonTexture=nofocus);
self.HoroTxt.setSpace(2);
self.HoroTxt.setImageDimensions(0,0);
#,itemTextXOffset=-30,itemTextYOffset=-5
self.HoroTxt.setItemHeight(14);
zz=[self.HoroTxtBG,self.HoroTxtBG2,self.HoroTxt]
for z in zz:
self.addControl(z); #z.setAnimations([('WindowOpen','effect=fade delay=2000 time=2000 start=0 end=80')]);
self.HoroTxtBG.setWidth(w); self.HoroTxtBG.setHeight(h); self.HoroTxtBG2.setWidth(w); self.HoroTxtBG2.setHeight(h);
self.HoroTxtBG.setAnimations([('WindowOpen','effect=fade delay=2000 time=2000 start=0 end=70')]);
self.HoroTxtBG2.setAnimations([('WindowOpen','effect=fade delay=2000 time=2000 start=0 end=98')]);
self.HoroTxt.setAnimations([('WindowOpen','effect=fade delay=2000 time=2000 start=0')]); ;
self.HoroTxt.addItems(self.PuzzleWordList.split('\n'));
Can you guide me what to do ?
thanks
iLovePython2000