mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Fix text() centering with x=-1
The game uses magic values x=-500 and y=-500 to indicate when a text box should be centered horizontally or vertically. It does this for x=-1 too, but it's buggy because it only looks at the first line of the text box to center it. In this commit I fix it so that it will look at all of the lines of the text box to center it instead.
This commit is contained in:
parent
6a17625727
commit
4fa62ca0aa
1 changed files with 2 additions and 2 deletions
|
@ -597,7 +597,7 @@ void scriptclass::run( KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
|
|||
dwgfx.textboxmoveto(textx);
|
||||
}
|
||||
|
||||
if (textx == -500)
|
||||
if (textx == -500 || textx == -1)
|
||||
{
|
||||
dwgfx.textboxcenterx();
|
||||
}
|
||||
|
@ -642,7 +642,7 @@ void scriptclass::run( KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
|
|||
dwgfx.textboxmoveto(textx);
|
||||
}
|
||||
|
||||
if (textx == -500)
|
||||
if (textx == -500 || textx == -1)
|
||||
{
|
||||
dwgfx.textboxcenterx();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue