mirror of
https://github.com/Febbweiss/mopidy-touchscreen.git
synced 2026-03-04 22:25:39 +00:00
Update only some parts of the display
This commit is contained in:
@@ -11,7 +11,7 @@ class MenuScreen(BaseScreen):
|
||||
BaseScreen.__init__(self, size, base_size, manager, fonts)
|
||||
self.ip = None
|
||||
self.core = core
|
||||
self.list = ListView((0, 0), (size[0], size[1]-base_size),
|
||||
self.list = ListView((0, 0), size,
|
||||
base_size, fonts['base'])
|
||||
|
||||
self.list_items = ["Random", "Repeat", "Single", "Consume",
|
||||
@@ -22,6 +22,10 @@ class MenuScreen(BaseScreen):
|
||||
def should_update(self):
|
||||
return self.list.should_update()
|
||||
|
||||
def find_update_rects(self, rects):
|
||||
return self.list_view.find_update_rects(rects)
|
||||
|
||||
|
||||
def update(self, screen, update_type, rects):
|
||||
update_all = (update_type == BaseScreen.update_all)
|
||||
self.list.render(screen, update_all, rects)
|
||||
|
||||
Reference in New Issue
Block a user