2007-04-19, 17:25
Scrolling though a ControlList using ACTION_MOVE_UP and ACTION_MOVE_DOWN
the code below, works fine
and if i hold down the MOVE_UP or MOVE_DOWN button it works fine,
until the Scroll speed changes then it loses it
ive have traked it down to (i think).
it seems to gets lost in def delfingering(self,id): function on the Scroll speed changes
so do i need to catch another action for the Scroll speed changes
if so what is the action for the Scroll speed change please
thanks
the code below, works fine
and if i hold down the MOVE_UP or MOVE_DOWN button it works fine,
until the Scroll speed changes then it loses it
ive have traked it down to (i think).
it seems to gets lost in def delfingering(self,id): function on the Scroll speed changes
so do i need to catch another action for the Scroll speed changes
if so what is the action for the Scroll speed change please
Code:
def onAction(self, action):
if action == ACTION_MOVE_UP:
self.delfingering(self.fingeringpicture)
self.displayfingering(self.list.getSelectedPosition())
if action == ACTION_MOVE_DOWN:
self.delfingering(self.fingeringpicture)
self.displayfingering(self.list.getSelectedPosition())
def displayfingering(self, id):
self.fingeringpicture=[]
for i in range(len(chords[id][2:])):
x = 300 - 30/2 + 6*30 - int(chords[id][2:][i][1])*30
y = 200 - 30/2 - 50/2 + int(chords[id][2:][i][2])*50
self.fingeringpicture.append(xbmcgui.ControlImage(x,y,30,30, RootDir + str(chords[id][2:][i][0])+".png"))
self.addControl(self.fingeringpicture[-1])
self.setFocus(self.list)
def delfingering(self,id):
for i in range(len(id)):
self.removeControl(self.fingeringpicture[i])
thanks