- fixed space calculations for oversized episode and skill menus.

This commit is contained in:
Christoph Oelckers 2020-05-25 22:12:08 +02:00
parent 3b65b0caec
commit 233d0b62b9
1 changed files with 5 additions and 4 deletions

View File

@ -1154,7 +1154,7 @@ void M_StartupEpisodeMenu(FNewGameStartup *gs)
if (totalheight < 190 || AllEpisodes.Size() == 1)
{
int newtop = (200 - totalheight + topy) / 2;
int newtop = (200 - totalheight) / 2;
int topdelta = newtop - topy;
if (topdelta < 0)
{
@ -1162,7 +1162,8 @@ void M_StartupEpisodeMenu(FNewGameStartup *gs)
{
ld->mItems[i]->OffsetPositionY(topdelta);
}
posy -= topdelta;
posy += topdelta;
ld->mYpos += topdelta;
}
if (!isOld) ld->mSelectedItem = ld->mItems.Size();
@ -1751,7 +1752,7 @@ void M_StartupSkillMenu(FNewGameStartup *gs)
if (totalheight < 190 || MenuSkills.Size() == 1)
{
int newtop = (200 - totalheight + topy) / 2;
int newtop = (200 - totalheight) / 2;
int topdelta = newtop - topy;
if (topdelta < 0)
{
@ -1759,7 +1760,7 @@ void M_StartupSkillMenu(FNewGameStartup *gs)
{
ld->mItems[i]->OffsetPositionY(topdelta);
}
ld->mYpos = y = posy - topdelta;
ld->mYpos = y = posy + topdelta;
}
}
else