From 0311524e3e65804c0a25ffd9fa0d3656ed409747 Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 17 Aug 2023 16:27:01 +0800 Subject: [PATCH] feature title enabled for place, if so -85 offset --- stockTicker.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/stockTicker.py b/stockTicker.py index d4ca9cd..2fa137b 100755 --- a/stockTicker.py +++ b/stockTicker.py @@ -26,6 +26,7 @@ from datetime import datetime import matplotlib.colors as mcolors ny_zone = pytz.timezone('America/New_York') +place_featuretitle = False def getInput(Block=False): if Block or select.select([sys.stdin], [], [], 0) == ([sys.stdin], [], []): @@ -438,8 +439,13 @@ class StockTicker(): pause = float(settings['pause']) 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, place = options[i % len(options)] == 'r/place (Reddit)') + pause_frames = int(float(pause)/self.delay) + if options[i % len(options)] == 'r/place (Reddit)': + global place_featuretitle + place_true = place_featuretitle + else: + place_true = False + 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 = place_true) if kill: break if kill:break @@ -5607,6 +5613,8 @@ class StockTicker(): imgs = [] feature_title = False + global place_featuretitle + place_featuretitle = False for place in all_settings['places']: if "2017" in place: @@ -5614,6 +5622,7 @@ class StockTicker(): img = self.openImage('logos/r_place/r_place 2017.png') if all_settings['title']: feature_title = self.openImage('feature_titles/place2017.png') + place_featuretitle = True except: pass elif "2022" in place: @@ -5621,6 +5630,7 @@ class StockTicker(): img = self.openImage('logos/r_place/r_place 2022.png') if all_settings['title']: feature_title = self.openImage('feature_titles/place2022.png') + place_featuretitle = True except: pass elif "2023" in place: @@ -5628,6 +5638,7 @@ class StockTicker(): img = self.openImage('logos/r_place/r_place 2023.png') if all_settings['title']: feature_title = self.openImage('feature_titles/place2023.png') + place_featuretitle = True except: pass try: