Extended MENUDEF Functionality
*Added Font and TextureID types to Option and Image Scroller items (List items already have these) *Added "Class" instruction for Image Scrollers *Added ability for Option items to read in their OptionMenuDescriptor (List and Image Scroller items already have this) *Added "ForceList" instruction for Lists so that skill, playerclass, and episode menus don't get overridden
This commit is contained in:
parent
63c2d93033
commit
599b00f2ea
3 changed files with 65 additions and 7 deletions
|
|
@ -616,9 +616,9 @@ void M_StartupEpisodeMenu(FNewGameStartup *gs)
|
|||
// center the menu on the screen if the top space is larger than the bottom space
|
||||
int totalheight = posy + AllEpisodes.Size() * spacing - topy;
|
||||
|
||||
if (totalheight < 190 || AllEpisodes.Size() == 1)
|
||||
if (ld->mForceList || totalheight < 190 || AllEpisodes.Size() == 1)
|
||||
{
|
||||
int newtop = (200 - totalheight) / 2;
|
||||
int newtop = max(10, 200 - totalheight) / 2;
|
||||
int topdelta = newtop - topy;
|
||||
if (topdelta < 0)
|
||||
{
|
||||
|
|
@ -760,9 +760,9 @@ static void BuildPlayerclassMenu()
|
|||
ld->mAutoselect = ld->mItems.Push(it);
|
||||
success = true;
|
||||
}
|
||||
else if (totalheight <= 190)
|
||||
else if (ld->mForceList || totalheight <= 190)
|
||||
{
|
||||
int newtop = (200 - totalheight + topy) / 2;
|
||||
int newtop = (max(10, 200 - totalheight) + topy) / 2;
|
||||
int topdelta = newtop - topy;
|
||||
if (topdelta < 0)
|
||||
{
|
||||
|
|
@ -1146,9 +1146,9 @@ void M_StartupSkillMenu(FNewGameStartup *gs)
|
|||
// center the menu on the screen if the top space is larger than the bottom space
|
||||
int totalheight = posy + MenuSkills.Size() * spacing - topy;
|
||||
|
||||
if (totalheight < 190 || MenuSkills.Size() == 1)
|
||||
if (ld->mForceList || totalheight < 190 || MenuSkills.Size() == 1)
|
||||
{
|
||||
int newtop = (200 - totalheight) / 2;
|
||||
int newtop = max(10, 200 - totalheight) / 2;
|
||||
int topdelta = newtop - topy;
|
||||
if (topdelta < 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue