mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Added config option to use cardset bottoms.
This commit is contained in:
parent
e81257ebd0
commit
4c2dd59928
3 changed files with 8 additions and 1 deletions
|
@ -696,6 +696,7 @@ class Application:
|
||||||
color=color,
|
color=color,
|
||||||
images=self.progress_images)
|
images=self.progress_images)
|
||||||
images = Images(self.dataloader, cs)
|
images = Images(self.dataloader, cs)
|
||||||
|
images.cardset_bottoms = self.opt.use_cardset_bottoms
|
||||||
try:
|
try:
|
||||||
if not images.load(app=self, progress=progress):
|
if not images.load(app=self, progress=progress):
|
||||||
raise Exception("Invalid or damaged cardset")
|
raise Exception("Invalid or damaged cardset")
|
||||||
|
|
|
@ -73,6 +73,8 @@ class Images:
|
||||||
self._highlight_index = 0 #
|
self._highlight_index = 0 #
|
||||||
self._highlighted_images = {} # key: (suit, rank)
|
self._highlighted_images = {} # key: (suit, rank)
|
||||||
|
|
||||||
|
self.cardset_bottoms = False
|
||||||
|
|
||||||
def destruct(self):
|
def destruct(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -109,7 +111,8 @@ class Images:
|
||||||
imagedir = self.d.findDir(cs_type, d)
|
imagedir = self.d.findDir(cs_type, d)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
if (not USE_PIL and TOOLKIT != 'kivy') or imagedir is None:
|
if ((not USE_PIL and TOOLKIT != 'kivy') or self.cardset_bottoms
|
||||||
|
or imagedir is None):
|
||||||
# load image
|
# load image
|
||||||
img = self.__loadCard(filename+self.cs.ext, check_w, check_h)
|
img = self.__loadCard(filename+self.cs.ext, check_w, check_h)
|
||||||
return img
|
return img
|
||||||
|
|
|
@ -112,6 +112,7 @@ mouse_type = string
|
||||||
mouse_undo = boolean
|
mouse_undo = boolean
|
||||||
negative_bottom = boolean
|
negative_bottom = boolean
|
||||||
randomize_place = boolean
|
randomize_place = boolean
|
||||||
|
use_cardset_bottoms = boolean
|
||||||
dragcursor = boolean
|
dragcursor = boolean
|
||||||
save_games_geometry = boolean
|
save_games_geometry = boolean
|
||||||
game_geometry = int_list(min=2, max=2)
|
game_geometry = int_list(min=2, max=2)
|
||||||
|
@ -260,6 +261,7 @@ class Options:
|
||||||
('mouse_undo', 'bool'),
|
('mouse_undo', 'bool'),
|
||||||
('negative_bottom', 'bool'),
|
('negative_bottom', 'bool'),
|
||||||
('randomize_place', 'bool'),
|
('randomize_place', 'bool'),
|
||||||
|
('use_cardset_bottoms', 'bool'),
|
||||||
# ('save_cardsets', 'bool'),
|
# ('save_cardsets', 'bool'),
|
||||||
('dragcursor', 'bool'),
|
('dragcursor', 'bool'),
|
||||||
('save_games_geometry', 'bool'),
|
('save_games_geometry', 'bool'),
|
||||||
|
@ -441,6 +443,7 @@ class Options:
|
||||||
self.offsets = {} # cards offsets
|
self.offsets = {} # cards offsets
|
||||||
#
|
#
|
||||||
self.randomize_place = False
|
self.randomize_place = False
|
||||||
|
self.use_cardset_bottoms = False
|
||||||
# self.save_cardsets = True
|
# self.save_cardsets = True
|
||||||
self.dragcursor = True
|
self.dragcursor = True
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Reference in a new issue