Update only some parts of the display

This commit is contained in:
Ander Orbegozo
2016-10-08 02:17:49 +02:00
parent 1fe68e9d94
commit c3c2a67c7c
10 changed files with 113 additions and 87 deletions

View File

@@ -10,9 +10,7 @@ class Tracklist(BaseScreen):
self.size = size
self.base_size = base_size
self.manager = manager
self.list_view = ListView((0, 0), (
self.size[0], self.size[1] -
self.base_size), self.base_size, self.fonts['base'])
self.list_view = ListView((0, 0), size, self.base_size, self.fonts['base'])
self.tracks = []
self.tracks_strings = []
self.update_list()
@@ -22,6 +20,10 @@ class Tracklist(BaseScreen):
def should_update(self):
return self.list_view.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_view.render(screen, update_all, rects)