feature title enabled for place, if so -85 offset

This commit is contained in:
Justin 2023-08-17 16:27:01 +08:00 committed by GitHub
parent c7c3e5b58c
commit 0311524e3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,6 +26,7 @@ from datetime import datetime
import matplotlib.colors as mcolors import matplotlib.colors as mcolors
ny_zone = pytz.timezone('America/New_York') ny_zone = pytz.timezone('America/New_York')
place_featuretitle = False
def getInput(Block=False): def getInput(Block=False):
if Block or select.select([sys.stdin], [], [], 0) == ([sys.stdin], [], []): if Block or select.select([sys.stdin], [], [], 0) == ([sys.stdin], [], []):
@ -438,8 +439,13 @@ class StockTicker():
pause = float(settings['pause']) pause = float(settings['pause'])
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, place = options[i % len(options)] == 'r/place (Reddit)') 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
if kill:break if kill:break
@ -5607,6 +5613,8 @@ class StockTicker():
imgs = [] imgs = []
feature_title = False feature_title = False
global place_featuretitle
place_featuretitle = False
for place in all_settings['places']: for place in all_settings['places']:
if "2017" in place: if "2017" in place:
@ -5614,6 +5622,7 @@ class StockTicker():
img = self.openImage('logos/r_place/r_place 2017.png') img = self.openImage('logos/r_place/r_place 2017.png')
if all_settings['title']: if all_settings['title']:
feature_title = self.openImage('feature_titles/place2017.png') feature_title = self.openImage('feature_titles/place2017.png')
place_featuretitle = True
except: except:
pass pass
elif "2022" in place: elif "2022" in place:
@ -5621,6 +5630,7 @@ class StockTicker():
img = self.openImage('logos/r_place/r_place 2022.png') img = self.openImage('logos/r_place/r_place 2022.png')
if all_settings['title']: if all_settings['title']:
feature_title = self.openImage('feature_titles/place2022.png') feature_title = self.openImage('feature_titles/place2022.png')
place_featuretitle = True
except: except:
pass pass
elif "2023" in place: elif "2023" in place:
@ -5628,6 +5638,7 @@ class StockTicker():
img = self.openImage('logos/r_place/r_place 2023.png') img = self.openImage('logos/r_place/r_place 2023.png')
if all_settings['title']: if all_settings['title']:
feature_title = self.openImage('feature_titles/place2023.png') feature_title = self.openImage('feature_titles/place2023.png')
place_featuretitle = True
except: except:
pass pass
try: try: