feat: center text when alone with no other effects

This commit is contained in:
2024-07-01 09:59:18 +02:00
parent ae825d7f5d
commit e637d64164
39 changed files with 44 additions and 43 deletions
+1 -1
View File
@@ -11,7 +11,7 @@
"restack_discarded_champion":"Mettez un champion de votre défausse au dessus de votre pioche.",
"make_discard":"L'adversaire ciblé se défausse d'une carte",
"draw_and_discard":"Vous pouvez piocher une carte.\nSi vous faites ainsi, défaussez vous d'une carte.",
"play_next_card_bought":"Mettez dans votre main la prochaine carte dont vous faites l'acquisition.",
"play_next_card_bought":"Mettez dans votre main la prochaine carte dont vous faites l'acquisition."
}
}
+3 -2
View File
@@ -190,7 +190,7 @@ def create_effect_row(effects: list[Effect], type: str, height: int, width: int)
text_y_pos = height - effect_text_size / 2
if len(effect_with_icons) == 0:
text_y_pos = height / 2
text_y_pos = (height / 2) + (effect_text_size / 4)
icon_y_pos = (height / 2) - effect_text_size / 2
@@ -202,9 +202,10 @@ def create_effect_row(effects: list[Effect], type: str, height: int, width: int)
for e in effect_with_text:
if effect_text != "":
effect_text += " "
effect_text += translation_fr.get("effects").get(
translation = translation_fr.get("effects").get(
e.get("effect"), e.get("effect")
)
effect_text += translation
group.append(
dw.Text(