Update only when nedeed

This commit is contained in:
Ander
2014-11-14 12:00:06 +01:00
parent 00b50c5202
commit e62f710f51
8 changed files with 25 additions and 14 deletions

View File

@@ -38,6 +38,7 @@ class ScreenObjectsManager():
def get_touch_object(self, key):
return self.touch_objects[key]
def render(self, surface):
for key in self.text_objects:
if self.text_objects[key].update():
@@ -369,6 +370,7 @@ class Progressbar(TouchObject):
return x * self.max / self.size[0]
def set_text(self, text):
self.dirty = True
self.text.set_text(text, True)