From c74e62d9278f43d9cbe55f0b9e22c23a0fbb1231 Mon Sep 17 00:00:00 2001 From: Lukas Schulz Date: Sun, 20 Dec 2020 12:21:42 +0100 Subject: [PATCH] yes. --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 47df705..7fa032a 100644 --- a/main.py +++ b/main.py @@ -121,12 +121,12 @@ def scrolling_text(text,offset_x=0,offset_y=0): #print(scroll_frame_time) if(scroll_frame_time>0.1): scroll_frame_time = 0.1 - for i in range(font.getsize(text)[0]-160): + for i in range((font.getsize(text)[0]-160)*2): scrolled_text_canvas = Image.new('RGB', (160, 11), color = 'black') scrolled_text = ImageDraw.Draw(scrolled_text_canvas) - scrolled_text.text((-i,0), text) + scrolled_text.text((-i/2,0), text) showImage(scrolled_text_canvas, offset_x, offset_y) - time.sleep(scroll_frame_time) + time.sleep(scroll_frame_time/2) #print('scrolled '+str(i)+' px') if((5-(font.getsize(text)[0]-160)*2*scroll_frame_time)>0): time.sleep(5-(font.getsize(text)[0]-160)*2*scroll_frame_time)