mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +00:00
- SW: fixed issue with autoselecting single episode entries with non-empty subtitles.
This case needs different offsets.
This commit is contained in:
parent
3163e4a799
commit
26c5d5aa32
1 changed files with 3 additions and 1 deletions
|
@ -370,6 +370,7 @@ static void BuildEpisodeMenu()
|
||||||
{
|
{
|
||||||
// Build episode menu
|
// Build episode menu
|
||||||
int addedVolumes = 0;
|
int addedVolumes = 0;
|
||||||
|
bool textadded = false;
|
||||||
DMenuDescriptor** desc = MenuDescriptors.CheckKey(NAME_Episodemenu);
|
DMenuDescriptor** desc = MenuDescriptors.CheckKey(NAME_Episodemenu);
|
||||||
if (desc != nullptr && (*desc)->IsKindOf(RUNTIME_CLASS(DListMenuDescriptor)))
|
if (desc != nullptr && (*desc)->IsKindOf(RUNTIME_CLASS(DListMenuDescriptor)))
|
||||||
{
|
{
|
||||||
|
@ -402,6 +403,7 @@ static void BuildEpisodeMenu()
|
||||||
gVolumeSubtitles[i], SmallFont, CR_GRAY, false, NAME_None, i);
|
gVolumeSubtitles[i], SmallFont, CR_GRAY, false, NAME_None, i);
|
||||||
y += ld->mLinespacing * 6 / 10;
|
y += ld->mLinespacing * 6 / 10;
|
||||||
ld->mItems.Push(it);
|
ld->mItems.Push(it);
|
||||||
|
textadded = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -419,7 +421,7 @@ static void BuildEpisodeMenu()
|
||||||
#endif
|
#endif
|
||||||
if (addedVolumes == 1)
|
if (addedVolumes == 1)
|
||||||
{
|
{
|
||||||
ld->mAutoselect = ld->mItems.Size()-1;
|
ld->mAutoselect = ld->mItems.Size() - (textadded ? 2 : 1);
|
||||||
}
|
}
|
||||||
if (popped) ld->mItems.Push(popped);
|
if (popped) ld->mItems.Push(popped);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue