self.onSelChanged = [ ]
self["list"] = HelpMenuList(list, self.close)
+ self["list"].onSelChanged.append(self.SelectionChanged)
self["rc"] = Pixmap()
self["arrowup"] = MovingPixmap()
{
"ok": self["list"].ok,
"back": self.close,
- "up": self.up,
- "down": self.down
}, -1)
-
- def up(self):
- self["list"].instance.moveSelection(self["list"].instance.moveUp)
- self.SelectionChanged()
-
- def down(self):
- self["list"].instance.moveSelection(self["list"].instance.moveDown)
- self.SelectionChanged()
def SelectionChanged(self):
selection = self["list"].getCurrent()[3]
+ arrow = self["arrowup"]
+
if selection is None:
- self["arrowup"].instance.hide()
+ arrow.hide()
else:
- self["arrowup"].moveTo(selection[1], selection[2], 1)
- self["arrowup"].startMoving()
- self["arrowup"].instance.show()
+ arrow.moveTo(selection[1], selection[2], 1)
+ arrow.startMoving()
+ arrow.show()
class HelpableScreen:
def __init__(self):
{
"displayHelp": self.showHelp,
})
+
def showHelp(self):
self.session.openWithCallback(self.callHelpAction, HelpMenu, self.helpList)
+
def callHelpAction(self, *args):
if len(args):
(actionmap, context, action) = args