1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

Compare commits

...

2 commits

Author SHA1 Message Date
Joe R
fd230df4f2 Perform minor cleanup of resource.py 2024-07-28 23:35:19 -04:00
Joe R
d15ff23d49 Fix to support equivalent image file extensions 2024-07-28 12:45:24 -04:00
2 changed files with 7 additions and 4 deletions

View file

@ -185,8 +185,10 @@ class CSI:
TYPE_ISHIDO = 12
# cardset subtypes
# (french)
SUBTYPE_NONE = 0
SUBTYPE_JOKER_DECK = 1
# (puzzle)
SUBTYPE_3X3 = 3
SUBTYPE_4X4 = 4
SUBTYPE_5X5 = 5
@ -574,7 +576,7 @@ class CardsetManager(ResourceManager):
return
cs.ncards = len(cs.ranks) * len(cs.suits) + len(cs.trumps)
cs.name = cs.name[:30]
if not (1 <= cs.si.size <= 5):
if not (CSI.SIZE_TINY <= cs.si.size <= CSI.SIZE_HIRES):
CW, CH = cs.CARDW, cs.CARDH
if CW <= 55 and CH <= 72:
cs.si.size = CSI.SIZE_TINY

View file

@ -85,14 +85,15 @@ CARDSET = _("cardset")
IMAGE_EXTENSIONS = (".gif", ".ppm", ".png")
if 1 and os.name == "nt":
IMAGE_EXTENSIONS = (".png", ".gif", ".ppm", ".jpg",)
IMAGE_EXTENSIONS = (".png", ".gif", ".ppm", ".jpg", ".jpeg",)
pass
if Image:
IMAGE_EXTENSIONS = (".png", ".gif", ".jpg", ".ppm", ".bmp")
IMAGE_EXTENSIONS = (".png", ".gif", ".jpg", ".jpeg", ".ppm", ".bmp")
if TOOLKIT == 'kivy':
IMAGE_EXTENSIONS = (".png", ".bmp", ".ppm", ".jpg", ".tiff")
IMAGE_EXTENSIONS = (".png", ".bmp", ".ppm", ".jpg", ".jpeg", ".tif",
".tiff")
# ************************************************************************
# * DataLoader