scroll past 85 pixels (feature title) of place
This commit is contained in:
parent
0abad58446
commit
a4060214ea
@ -132,11 +132,15 @@ class StockTicker():
|
|||||||
(r, g, b) = pixels[x, y]
|
(r, g, b) = pixels[x, y]
|
||||||
self.matrix.SetPixel(x + offset_x, y + offset_y, r*self.brightness, g*self.brightness, b*self.brightness)
|
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
|
img_width, img_height = image.size
|
||||||
kill = False
|
kill = False
|
||||||
|
if place:
|
||||||
|
value = -85
|
||||||
|
else:
|
||||||
|
value = 0
|
||||||
while offset_x > -(img_width+1):
|
while offset_x > -(img_width+1):
|
||||||
if offset_x == 0:
|
if offset_x == value:
|
||||||
while pause_frames > 0:
|
while pause_frames > 0:
|
||||||
if pause_frames%frame_skip == 0:
|
if pause_frames%frame_skip == 0:
|
||||||
self.incrementGIF(image)
|
self.incrementGIF(image)
|
||||||
@ -435,7 +439,7 @@ class StockTicker():
|
|||||||
except:
|
except:
|
||||||
pause = 0
|
pause = 0
|
||||||
pause_frames = int(float(pause)/self.delay)
|
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
|
||||||
if kill:break
|
if kill:break
|
||||||
|
Loading…
Reference in New Issue
Block a user