May-31-2018, 04:47 PM
In the examples of the dot3k the instance of the main class is passed as an argument to the Menu:
my_invader = SpaceInvader() # creating an instance menu = Menu({ 'Space Invader': my_invader, 'Clock': Clock(), 'Status': { 'IP': IPAddress(), 'CPU': GraphCPU(), 'Temp': GraphTemp() }, 'Settings': { 'Volume': Volume(), 'Display': { 'Contrast': Contrast(lcd), 'Backlight': Backlight(backlight) } } }, lcd, my_invader, # here it is passed as an argument. 30)