Initial tracklist support

This commit is contained in:
9and3r
2014-07-25 14:52:30 +02:00
parent 33d0ac145f
commit 7d76bb1feb
7 changed files with 116 additions and 61 deletions

View File

@@ -36,6 +36,7 @@ class ScreenObjectsManager():
self.text_objects[key].update()
self.text_objects[key].render(surface)
for key in self.touch_objects:
self.touch_objects[key].update()
self.touch_objects[key].render(surface)
def get_touch_objects_in_pos(self, pos):
@@ -67,6 +68,9 @@ class BaseItem():
def get_right_pos(self):
return self.pos2[0]
def update(self):
pass
class TextItem(BaseItem):
@@ -144,10 +148,10 @@ class TouchAndTextItem(TouchObject, TextItem):
def __init__(self, font, text, pos, pos2, color,text_size):
TextItem.__init__(self, font, text, pos, pos2, color,text_size)
TouchObject.__init__(self,pos,self.pos2)
TouchObject.__init__(self, pos, self.pos2)
def update(self):
TextItem.update()
TextItem.update(self)
def set_active(self, active):
self.active = active
@@ -180,6 +184,7 @@ class Progressbar(TouchObject, TextItem):
def update(self):
pass
def render(self, surface):
surface.blit(self.surface, self.pos)
self.text.render(surface)