mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- fixed space calculations for oversized episode and skill menus.
This commit is contained in:
parent
3b65b0caec
commit
233d0b62b9
1 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue