本文整理匯總了Python中navigation.Navigation.moveDown方法的典型用法代碼示例。如果您正苦於以下問題:Python Navigation.moveDown方法的具體用法?Python Navigation.moveDown怎麽用?Python Navigation.moveDown使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類navigation.Navigation
的用法示例。
在下文中一共展示了Navigation.moveDown方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Interface
# 需要導入模塊: from navigation import Navigation [as 別名]
# 或者: from navigation.Navigation import moveDown [as 別名]
class Interface(object):
def __init__(self):
self._lcd_plate = LcdPlate()
self._navigation = Navigation()
self.initScreen()
def initScreen(self):
self._lcd_plate.clear()
self._lcd_plate.setBackLightCyan()
# Set the screen to the top of the menu
self._lcd_plate.message(self._navigation.currentItem())
def pressedDown(self):
self._navigation.moveDown()
def pressedLeft(self):
self._navigation.moveLeft()
def pressedRight(self):
self._navigation.moveRight()
def pressedSelect(self):
# TODO: Actually run the process that the navigation items expects
self._lcd_plate.clear()
self._lcd_plate.message("In Select")
def pressedUp(self):
self._navigation.moveUp()
def run(self):
while True:
for button in self._lcd_plate.buttons():
# Check if a button is pressed & there has been pause in pressing the buttons
if self._lcd_plate.pressedSinceLastCheck(button):
# Call function of the button pressed
getattr(self, 'pressed' + self._lcd_plate.titleOfButton(button))()
self.initScreen()