mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-19 15:40:58 +00:00
- activated the user map menu item in the episode selection.
This commit is contained in:
parent
ffd23c23ca
commit
6dfd975f88
3 changed files with 5 additions and 10 deletions
|
@ -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))
|
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;
|
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);
|
ld->mItems.Push(it);
|
||||||
addedVolumes++;
|
addedVolumes++;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (addedVolumes == 1)
|
if (addedVolumes == 1)
|
||||||
{
|
{
|
||||||
ld->mAutoselect = ld->mItems.Size() - (textadded ? 2 : 1);
|
ld->mAutoselect = ld->mItems.Size() - (textadded ? 2 : 1);
|
||||||
|
|
|
@ -131,8 +131,8 @@ void ReadUserMaps()
|
||||||
{
|
{
|
||||||
auto fn1 = fileSystem.GetFileFullName(i);
|
auto fn1 = fileSystem.GetFileFullName(i);
|
||||||
if (!fn1 || !*fn1) continue;
|
if (!fn1 || !*fn1) continue;
|
||||||
auto map = strstr(fn1, ".map");
|
FString lowfn = fn1;
|
||||||
if (!map || strcmp(map, ".map")) continue;
|
if (lowfn.Right(4).CompareNoCase(".map")) continue;
|
||||||
if (!ValidateMap(i)) continue;
|
if (!ValidateMap(i)) continue;
|
||||||
InsertMap(i);
|
InsertMap(i);
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ struct UsermapDirectory native
|
||||||
Selected -= GetNumDirectories();
|
Selected -= GetNumDirectories();
|
||||||
let entry = GetEntry(Selected);
|
let entry = GetEntry(Selected);
|
||||||
if (!entry) return "";
|
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);
|
return String.Format("Map %s\n%s", entry.filename, entry.container);
|
||||||
}
|
}
|
||||||
void Select(int Selected)
|
void Select(int Selected)
|
||||||
|
@ -171,7 +171,6 @@ class UsermapMenu : ListMenu
|
||||||
numdirs = currentDir.GetNumDirectories();
|
numdirs = currentDir.GetNumDirectories();
|
||||||
numentries = currentDir.GetNumEntries();
|
numentries = currentDir.GetNumEntries();
|
||||||
NumTotalEntries = numparent + numdirs + numentries;
|
NumTotalEntries = numparent + numdirs + numentries;
|
||||||
Console.Printf("Selects = %d", selects.Size());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override void Drawer ()
|
override void Drawer ()
|
||||||
|
|
Loading…
Reference in a new issue