From 3ff83bedb3b09a58f097cd2c52a154e8b42df270 Mon Sep 17 00:00:00 2001 From: Sumpfork Date: Mon, 22 Oct 2012 10:58:32 -0700 Subject: [PATCH] better offsets for cost text for shelter tabs --- dominion_tabs.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dominion_tabs.py b/dominion_tabs.py index 2b371e6..8ddc07f 100644 --- a/dominion_tabs.py +++ b/dominion_tabs.py @@ -145,7 +145,8 @@ class DominionTabs: costHeight = textHeight-1 if card.types == ('Victory','Reaction') or\ card.types == ('Treasure','Reaction') or\ - card.types == ('Action','Ruins'): + card.types == ('Action','Ruins') or\ + len(card.types) > 1 and card.types[1].lower() == 'shelter': costHeight = textHeight+1 potSize = 11 potHeight = 2 @@ -167,7 +168,10 @@ class DominionTabs: cost = str(card.cost) if 'Prize' in card.types: cost += '*' - self.canvas.drawCentredString(12,costHeight,cost) + costWidthOffset = 12 + if len(card.types) > 1 and card.types[1].lower() == 'shelter': + costWidthOffset = 10 + self.canvas.drawCentredString(costWidthOffset,costHeight,cost) fontSize = 12 name = card.name.upper() name_parts = name.partition(' / ')