Enabled PopupAnimated to show file based GIFs, Added default title to be message in PopupGetFolder

This commit is contained in:
MikeTheWatchGuy 2019-03-16 17:12:27 -04:00
parent 4131da5f6e
commit c7fcd50632
1 changed files with 5 additions and 2 deletions

View File

@ -3479,7 +3479,7 @@ class ErrorElement(Element):
Stretch = ErrorElement
# ------------------------------------------------------------------------- #
# Window CLASS #
# Window CLASS #
# ------------------------------------------------------------------------- #
class Window:
NumOpenWindows = 0
@ -7540,7 +7540,10 @@ def PopupAnimated(image_source, message=None, background_color=None, text_color=
return
if image_source not in Window.animated_popup_dict:
layout = [[Image(data=image_source, background_color=background_color, key='_IMAGE_',)],]
if type(image_source) is bytes:
layout = [[Image(data=image_source, background_color=background_color, key='_IMAGE_',)],]
else:
layout = [[Image(filename=image_source, background_color=background_color, key='_IMAGE_',)],]
if message:
layout.append([Text(message, background_color=background_color, text_color=text_color, font=font)])