diff --git a/stockTicker.py b/stockTicker.py index 9503915..c9599d7 100755 --- a/stockTicker.py +++ b/stockTicker.py @@ -132,11 +132,15 @@ class StockTicker(): (r, g, b) = pixels[x, y] self.matrix.SetPixel(x + offset_x, y + offset_y, r*self.brightness, g*self.brightness, b*self.brightness) - def scrollImage(self, image, offset_x = 0, offset_y = 0, frame_skip = 10, gif = False, pause_frames = 0): + def scrollImage(self, image, offset_x = 0, offset_y = 0, frame_skip = 10, gif = False, pause_frames = 0, place = False)): img_width, img_height = image.size kill = False + if place: + value = -85 + else: + value = 0 while offset_x > -(img_width+1): - if offset_x == 0: + if offset_x == value: while pause_frames > 0: if pause_frames%frame_skip == 0: self.incrementGIF(image) @@ -435,7 +439,7 @@ class StockTicker(): except: pause = 0 pause_frames = int(float(pause)/self.delay) - kill = self.scrollImage(image, offset_x = offset_x, offset_y = offset_y, frame_skip = frame_skip, gif = options[i % len(options)] == 'Custom GIFs', pause_frames = pause_frames) + kill = self.scrollImage(image, offset_x = offset_x, offset_y = offset_y, frame_skip = frame_skip, gif = options[i % len(options)] == 'Custom GIFs', pause_frames = pause_frames, place = options[i % len(options)] == 'r/place (Reddit)') if kill: break if kill:break