mirror of
https://github.com/Febbweiss/mopidy-touchscreen.git
synced 2026-03-05 06:35:43 +00:00
10 FPS
We will save CPU. (In my computer around %10 less CPU is used now) Some adjustments so that the 10 FPS are not noticeable
This commit is contained in:
@@ -214,6 +214,9 @@ class BaseItem():
|
||||
|
||||
|
||||
class TextItem(BaseItem):
|
||||
|
||||
scroll_speed = 2
|
||||
|
||||
def __init__(self, font, text, pos, size, center=False):
|
||||
self.font = font
|
||||
self.text = text
|
||||
@@ -253,7 +256,7 @@ class TextItem(BaseItem):
|
||||
if self.step > self.box.get_rect().width:
|
||||
self.step = -self.size[0]
|
||||
else:
|
||||
self.step = self.step + 1
|
||||
self.step = self.step + TextItem.scroll_speed
|
||||
return True
|
||||
else:
|
||||
return BaseItem.update(self)
|
||||
|
||||
Reference in New Issue
Block a user