remove coin from tabs, draw it separately

This commit is contained in:
sumpfork@mailmight.com 2012-11-02 16:01:49 -07:00
parent 55a2d1944d
commit 02aa832bc9
13 changed files with 6 additions and 4 deletions

View File

@ -57,7 +57,8 @@ class DominionTabs:
('Victory','Shelter') : 'shelter.png', ('Victory','Shelter') : 'shelter.png',
('Curse',) : 'curse.png' ('Curse',) : 'curse.png'
} }
noCoinLabelImages = dict(((name,''.join((os.path.splitext(fname)[0]+'_nc',os.path.splitext(fname)[1]))) for name,fname in labelImages.iteritems()))
setImages = { setImages = {
'base' : 'base_set.png', 'base' : 'base_set.png',
} }
@ -131,7 +132,7 @@ class DominionTabs:
self.tabTotalHeight-self.tabLabelHeight) self.tabTotalHeight-self.tabLabelHeight)
else: else:
self.canvas.translate(0,self.tabTotalHeight-self.tabLabelHeight) self.canvas.translate(0,self.tabTotalHeight-self.tabLabelHeight)
self.canvas.drawImage(os.path.join('images',DominionTabs.labelImages[card.types]),1,0, self.canvas.drawImage(os.path.join('images',DominionTabs.noCoinLabelImages[card.types]),1,0,
self.tabLabelWidth-2,self.tabLabelHeight-1, self.tabLabelWidth-2,self.tabLabelHeight-1,
preserveAspectRatio=False,anchor='n',mask='auto') preserveAspectRatio=False,anchor='n',mask='auto')
if card.types[0] == 'Treasure' and (len(card.types) == 1 or card.types[1] != 'Reaction')\ if card.types[0] == 'Treasure' and (len(card.types) == 1 or card.types[1] != 'Reaction')\
@ -151,6 +152,7 @@ class DominionTabs:
potSize = 11 potSize = 11
potHeight = 2 potHeight = 2
self.canvas.drawImage("images/coin_small.png",4,costHeight-5,16,16,preserveAspectRatio=True,mask='auto')
textInset = 22 textInset = 22
textWidth = 85 textWidth = 85
@ -169,8 +171,8 @@ class DominionTabs:
if 'Prize' in card.types: if 'Prize' in card.types:
cost += '*' cost += '*'
costWidthOffset = 12 costWidthOffset = 12
if len(card.types) > 1 and card.types[1].lower() == 'shelter': #if len(card.types) > 1 and card.types[1].lower() == 'shelter':
costWidthOffset = 10 # costWidthOffset = 10
self.canvas.drawCentredString(costWidthOffset,costHeight,cost) self.canvas.drawCentredString(costWidthOffset,costHeight,cost)
fontSize = 12 fontSize = 12
name = card.name.upper() name = card.name.upper()

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
images/action_nc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
images/curse_nc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
images/duration_nc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
images/reaction_nc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
images/ruins_nc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
images/shelter_nc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

BIN
images/treasure_nc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
images/victory_nc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB