Hackfix for TUTNT Supportive Edition episode names.

This commit is contained in:
Mari the Deer 2022-09-05 13:43:00 +02:00
commit ef12c72825
2 changed files with 9 additions and 2 deletions

View file

@ -396,6 +396,11 @@ Class SWWMBigMenuHack : SWWMCleanMenu
{
Super.Init(parent,desc);
mSmallFont = Font.GetFont('TewiFont');
uint tntfix = 0; // HACKFIX: TUTNT Supportive Edition uses one patch graphic for all episode names, this breaks our menus
static const string tutnt_ep[] =
{
"Opening Abyss", "Armory of Pain", "Damnation's Keep", "Havoc", "Fury of Fire"
};
for ( int i=0; i<mDesc.mItems.Size(); i++ )
{
let itm = mDesc.mItems[i];
@ -408,6 +413,8 @@ Class SWWMBigMenuHack : SWWMCleanMenu
int p;
[c, p] = ti.GetAction();
rep.InitDirect(ti.GetX(),ti.GetY(),BIGMENUSPACING,ti.mHotkey,ti.mText,ti.mFont,ti.mColor,ti.mColorSelected,c,p);
if ( (ti.mText == "$M_EPITNT") || (tntfix && (tntfix < 5)) )
rep.mText = tutnt_ep[tntfix++];
mDesc.mItems[i] = rep;
ti.Destroy();
}