Skip to content

Commit

Permalink
WML [message]: Add left padding when the portrait is shown on the right.
Browse files Browse the repository at this point in the history
The text is now shown at exactly the same place regardless of which side
the portrait is on.

Fixes #1938.
  • Loading branch information
jostephd authored and GregoryLundberg committed Sep 14, 2018
1 parent 243a542 commit fc9e5f0
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions data/gui/window/wml_message.cfg
Expand Up @@ -633,7 +633,9 @@ if(gamemap_width - ({__GUI_IMAGE_WIDTH}) > {MAX_TEXT_WIDTH}
[column]

[spacer]
width = 10
width = "(
if(gamemap_width - ({__GUI_IMAGE_WIDTH} + ({__GUI_IMAGE_WIDTH})) > {MAX_TEXT_WIDTH} , {__GUI_IMAGE_WIDTH} , 10)
)"
height = 75
[/spacer]

Expand All @@ -645,10 +647,12 @@ if(gamemap_width - ({__GUI_IMAGE_WIDTH}) > {MAX_TEXT_WIDTH}

[spacer]
width = "(
if(gamemap_width - (10 + ({__GUI_IMAGE_WIDTH})) > {MAX_TEXT_WIDTH}
, gamemap_width - (10 + ({__GUI_IMAGE_WIDTH}) + {MAX_TEXT_WIDTH})
if(gamemap_width - (left_padding + ({__GUI_IMAGE_WIDTH})) > {MAX_TEXT_WIDTH}
, gamemap_width - (left_padding + ({__GUI_IMAGE_WIDTH}) + {MAX_TEXT_WIDTH})
, 0
))"
)
where left_padding = if(gamemap_width - ({__GUI_IMAGE_WIDTH} + ({__GUI_IMAGE_WIDTH})) > {MAX_TEXT_WIDTH} , {__GUI_IMAGE_WIDTH} , 10)
)"
height = 75
[/spacer]

Expand Down

0 comments on commit fc9e5f0

Please sign in to comment.