- activated the user map menu item in the episode selection.

This commit is contained in:
Christoph Oelckers 2021-12-26 17:57:17 +01:00
parent ffd23c23ca
commit 6dfd975f88
3 changed files with 5 additions and 10 deletions

View file

@ -434,18 +434,14 @@ static void BuildEpisodeMenu()
}
}
}
#if 0 // this needs to be backed by a working selection menu, until that gets done it must be disabled.
if (!(g_gameType & GAMEFLAG_SHAREWARE))
{
//auto it = new FListMenuItemNativeStaticText(ld->mXpos, "", NIT_SmallFont); // empty entry as spacer.
//ld->mItems.Push(it);
y += ld->mLinespacing / 3;
auto it = CreateCustomListMenuItemText(ld->mXpos, y, ld->mLinespacing, 'U', "$MNU_USERMAP", ld->mFont, 0, 0, NAME_UsermapMenu);
auto it = CreateCustomListMenuItemText(ld->mXpos, y, ld->mLinespacing, 'U', "$MNU_USERMAP", ld->mFont, CR_UNTRANSLATED, 0, NAME_UsermapMenu, 0);
ld->mItems.Push(it);
addedVolumes++;
}
#endif
if (addedVolumes == 1)
{
ld->mAutoselect = ld->mItems.Size() - (textadded ? 2 : 1);

View file

@ -131,8 +131,8 @@ void ReadUserMaps()
{
auto fn1 = fileSystem.GetFileFullName(i);
if (!fn1 || !*fn1) continue;
auto map = strstr(fn1, ".map");
if (!map || strcmp(map, ".map")) continue;
FString lowfn = fn1;
if (lowfn.Right(4).CompareNoCase(".map")) continue;
if (!ValidateMap(i)) continue;
InsertMap(i);
}

View file

@ -60,7 +60,7 @@ struct UsermapDirectory native
Selected -= GetNumDirectories();
let entry = GetEntry(Selected);
if (!entry) return "";
if (entry.info.Length() > 0) return String.Format("Map %s: %s\n%s", entry.filename, entry.info, entry.container);
if (entry.info.Length() > 0) return String.Format("Map %s: %s\n%s", entry.filename, StringTable.Localize(entry.info), entry.container);
return String.Format("Map %s\n%s", entry.filename, entry.container);
}
void Select(int Selected)
@ -171,7 +171,6 @@ class UsermapMenu : ListMenu
numdirs = currentDir.GetNumDirectories();
numentries = currentDir.GetNumEntries();
NumTotalEntries = numparent + numdirs + numentries;
Console.Printf("Selects = %d", selects.Size());
}
override void Drawer ()