4.10 support update (unfinished and untested).
This commit is contained in:
parent
eb624f15e3
commit
8e952f412f
80 changed files with 2343 additions and 2356 deletions
|
|
@ -55,10 +55,10 @@ Class SWWMAchievementMenu : GenericMenu
|
|||
// recalculate counters
|
||||
completed = 0;
|
||||
incomplete = 0;
|
||||
for ( int i=0; i<mItems.Size(); i++ )
|
||||
foreach ( itm:mItems )
|
||||
{
|
||||
if ( !!(hnd.achievementstate.At(mItems[i].basename).ToInt()) ) completed++;
|
||||
else if ( mItems[i].maxval && mItems[i].val ) incomplete++;
|
||||
if ( !!(hnd.achievementstate.At(itm.basename).ToInt()) ) completed++;
|
||||
else if ( itm.maxval && itm.val ) incomplete++;
|
||||
}
|
||||
// calculate how many rows to display
|
||||
int realh = (Screen.GetHeight()/CleanYFac_1)-160;
|
||||
|
|
|
|||
|
|
@ -214,45 +214,45 @@ Class SWWMCreditsMenu : GenericMenu
|
|||
// calc total height
|
||||
theight = int(logosz.y);
|
||||
theight += 8*(SECTION_PAD+mBigFont.GetHeight()*2);
|
||||
for ( int i=0; i<cdev.Size(); i++ )
|
||||
foreach ( c:cdev )
|
||||
{
|
||||
theight += ENTRY_PAD;
|
||||
theight += cdev[i].height;
|
||||
theight += c.height;
|
||||
}
|
||||
for ( int i=0; i<cassets.Size(); i++ )
|
||||
foreach ( c:cassets )
|
||||
{
|
||||
theight += ENTRY_PAD;
|
||||
theight += cassets[i].height;
|
||||
theight += c.height;
|
||||
}
|
||||
for ( int i=0; i<cmusic.Size(); i++ )
|
||||
foreach ( c:cmusic )
|
||||
{
|
||||
theight += ENTRY_PAD;
|
||||
theight += cmusic[i].height;
|
||||
theight += c.height;
|
||||
}
|
||||
for ( int i=0; i<cvoice.Size(); i++ )
|
||||
foreach ( c:cvoice )
|
||||
{
|
||||
theight += ENTRY_PAD;
|
||||
theight += cvoice[i].height;
|
||||
theight += c.height;
|
||||
}
|
||||
for ( int i=0; i<cfanart.Size(); i++ )
|
||||
foreach ( c:cfanart )
|
||||
{
|
||||
theight += ENTRY_PAD;
|
||||
theight += cfanart[i].height;
|
||||
theight += c.height;
|
||||
}
|
||||
for ( int i=0; i<clocal.Size(); i++ )
|
||||
foreach ( c:clocal )
|
||||
{
|
||||
theight += ENTRY_PAD;
|
||||
theight += clocal[i].height;
|
||||
theight += c.height;
|
||||
}
|
||||
for ( int i=0; i<cpatrons.Size(); i++ )
|
||||
foreach ( c:cpatrons )
|
||||
{
|
||||
theight += ENTRY_PAD;
|
||||
theight += cpatrons[i].height;
|
||||
theight += c.height;
|
||||
}
|
||||
for ( int i=0; i<cthanks.Size(); i++ )
|
||||
foreach ( c:cthanks )
|
||||
{
|
||||
theight += ENTRY_PAD;
|
||||
theight += cthanks[i].height;
|
||||
theight += c.height;
|
||||
}
|
||||
// music swap
|
||||
oldmus = musplaying.name;
|
||||
|
|
@ -302,66 +302,66 @@ Class SWWMCreditsMenu : GenericMenu
|
|||
// developer
|
||||
yy += SECTION_PAD;
|
||||
yy += DrawSection(xx,yy,sdev);
|
||||
for ( int i=0; i<cdev.Size(); i++ )
|
||||
foreach ( c:cdev )
|
||||
{
|
||||
yy += ENTRY_PAD;
|
||||
yy += cdev[i].Draw(ss,xx,yy);
|
||||
yy += c.Draw(ss,xx,yy);
|
||||
}
|
||||
// assets
|
||||
yy += SECTION_PAD;
|
||||
yy += DrawSection(xx,yy,sassets);
|
||||
for ( int i=0; i<cassets.Size(); i++ )
|
||||
foreach ( c:cassets )
|
||||
{
|
||||
yy += ENTRY_PAD;
|
||||
yy += cassets[i].Draw(ss,xx,yy);
|
||||
yy += c.Draw(ss,xx,yy);
|
||||
}
|
||||
// music
|
||||
yy += SECTION_PAD;
|
||||
yy += DrawSection(xx,yy,smusic);
|
||||
for ( int i=0; i<cmusic.Size(); i++ )
|
||||
foreach ( c:cmusic )
|
||||
{
|
||||
yy += ENTRY_PAD;
|
||||
yy += cmusic[i].Draw(ss,xx,yy);
|
||||
yy += c.Draw(ss,xx,yy);
|
||||
}
|
||||
// voices
|
||||
yy += SECTION_PAD;
|
||||
yy += DrawSection(xx,yy,svoice);
|
||||
for ( int i=0; i<cvoice.Size(); i++ )
|
||||
foreach ( c:cvoice )
|
||||
{
|
||||
yy += ENTRY_PAD;
|
||||
yy += cvoice[i].Draw(ss,xx,yy);
|
||||
yy += c.Draw(ss,xx,yy);
|
||||
}
|
||||
// fanart
|
||||
yy += SECTION_PAD;
|
||||
yy += DrawSection(xx,yy,sfanart);
|
||||
for ( int i=0; i<cfanart.Size(); i++ )
|
||||
foreach ( c:cfanart )
|
||||
{
|
||||
yy += ENTRY_PAD;
|
||||
yy += cfanart[i].Draw(ss,xx,yy);
|
||||
yy += c.Draw(ss,xx,yy);
|
||||
}
|
||||
// localization
|
||||
yy += SECTION_PAD;
|
||||
yy += DrawSection(xx,yy,slocal);
|
||||
for ( int i=0; i<clocal.Size(); i++ )
|
||||
foreach ( c:clocal )
|
||||
{
|
||||
yy += ENTRY_PAD;
|
||||
yy += clocal[i].Draw(ss,xx,yy);
|
||||
yy += c.Draw(ss,xx,yy);
|
||||
}
|
||||
// patrons
|
||||
yy += SECTION_PAD;
|
||||
yy += DrawSection(xx,yy,spatrons);
|
||||
for ( int i=0; i<cpatrons.Size(); i++ )
|
||||
foreach ( c:cpatrons )
|
||||
{
|
||||
yy += ENTRY_PAD;
|
||||
yy += cpatrons[i].Draw(ss,xx,yy);
|
||||
yy += c.Draw(ss,xx,yy);
|
||||
}
|
||||
// thanks
|
||||
yy += SECTION_PAD;
|
||||
yy += DrawSection(xx,yy,sthanks);
|
||||
for ( int i=0; i<cthanks.Size(); i++ )
|
||||
foreach ( c:cthanks )
|
||||
{
|
||||
yy += ENTRY_PAD;
|
||||
yy += cthanks[i].Draw(ss,xx,yy);
|
||||
yy += c.Draw(ss,xx,yy);
|
||||
}
|
||||
}
|
||||
override void Ticker()
|
||||
|
|
|
|||
|
|
@ -62,9 +62,9 @@ Class SWWMStatScreen : StatusScreen abstract
|
|||
}
|
||||
else
|
||||
{
|
||||
for ( int i=0; i<shnd.lastart.Size(); i++ )
|
||||
foreach ( la:shnd.lastart )
|
||||
{
|
||||
int f = ents.Find(shnd.lastart[i]);
|
||||
int f = ents.Find(la);
|
||||
if ( f != ents.Size() )
|
||||
ents.Delete(f);
|
||||
}
|
||||
|
|
@ -122,9 +122,9 @@ Class SWWMStatScreen : StatusScreen abstract
|
|||
}
|
||||
else
|
||||
{
|
||||
for ( int i=0; i<shnd.lasttip.Size(); i++ )
|
||||
foreach ( lt:shnd.lasttip )
|
||||
{
|
||||
int f = ents.Find(shnd.lasttip[i]);
|
||||
int f = ents.Find(lt);
|
||||
if ( f != ents.Size() )
|
||||
ents.Delete(f);
|
||||
}
|
||||
|
|
@ -1015,9 +1015,8 @@ Class SWWMStatScreen_DM : SWWMStatScreen
|
|||
String str;
|
||||
Array<Int> sorted;
|
||||
GetSortedPlayers(sorted,teamplay);
|
||||
for ( int j=0; j<sorted.Size(); j++ )
|
||||
foreach ( i:sorted )
|
||||
{
|
||||
int i = sorted[j];
|
||||
if ( !playeringame[i] ) continue;
|
||||
xx = int((ss.x-boxwidth)/2+pad);
|
||||
Screen.Dim(players[i].GetDisplayColor(),.4,int(xx*hs),int(yy*hs),int(linew*hs),int(lineh*hs));
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ Class OptionMenuItemSWWMVoiceOption : OptionMenuItemOptionBase
|
|||
lst.Clear();
|
||||
String dat = Wads.ReadLump(lmp);
|
||||
dat.Split(lst,"\n",0);
|
||||
for ( int i=0; i<lst.Size(); i++ )
|
||||
foreach ( l:lst )
|
||||
{
|
||||
if ( (lst[i].Length() <= 0) || (lst[i].GetNextCodePoint(0) == 0) || (lst[i].Left(1) == "\n") || (lst[i].Left(1) == "#") ) continue;
|
||||
types.Push(lst[i]);
|
||||
if ( (l.Length() <= 0) || (l.GetNextCodePoint(0) == 0) || (l.Left(1) == "\n") || (l.Left(1) == "#") ) continue;
|
||||
types.Push(l);
|
||||
}
|
||||
}
|
||||
return self;
|
||||
|
|
@ -355,11 +355,11 @@ Class SWWMMainMenu : SWWMCleanMenu
|
|||
Screen.DrawTexture(gradtex,false,Screen.GetWidth()/2,Screen.GetHeight(),DTA_Rotate,90,DTA_DestHeight,Screen.GetHeight(),DTA_DestWidthF,500*scl*alph,DTA_LegacyRenderStyle,STYLE_AddShaded,DTA_FillColor,Color(40,80,120),DTA_TopOffset,256,DTA_Alpha,alph);
|
||||
Screen.DrawTexture(gradtex,false,Screen.GetWidth()/2,0,DTA_Rotate,270,DTA_DestHeight,Screen.GetHeight(),DTA_DestWidthF,500*scl*alph,DTA_LegacyRenderStyle,STYLE_AddShaded,DTA_FillColor,Color(40,80,120),DTA_TopOffset,256,DTA_Alpha,alph);
|
||||
Screen.DrawTexture(demotex,false,Screen.GetWidth()/2,0,DTA_ScaleX,scl,DTA_ScaleY,scl,DTA_Alpha,alph,DTA_ColorOverlay,Color(int(255*(1.-(alph**2))),0,0,0));
|
||||
for ( int i=0; i<mDesc.mItems.Size(); i++ )
|
||||
mDesc.mItems[i].OffsetPositionY(GetMenuYOffset());
|
||||
foreach ( itm:mDesc.mItems )
|
||||
itm.OffsetPositionY(GetMenuYOffset());
|
||||
Super.Drawer();
|
||||
for ( int i=0; i<mDesc.mItems.Size(); i++ )
|
||||
mDesc.mItems[i].OffsetPositionY(-GetMenuYOffset());
|
||||
foreach ( itm:mDesc.mItems )
|
||||
itm.OffsetPositionY(-GetMenuYOffset());
|
||||
int xx, yy;
|
||||
String str = StringTable.Localize("$SWWM_MODVER");
|
||||
int width = mSmallFont.StringWidth(str)+8;
|
||||
|
|
@ -373,11 +373,11 @@ Class SWWMMainMenu : SWWMCleanMenu
|
|||
|
||||
override bool MouseEvent( int type, int x, int y )
|
||||
{
|
||||
for ( int i=0; i<mDesc.mItems.Size(); i++ )
|
||||
mDesc.mItems[i].OffsetPositionY(GetMenuYOffset());
|
||||
foreach ( itm:mDesc.mItems )
|
||||
itm.OffsetPositionY(GetMenuYOffset());
|
||||
let res = Super.MouseEvent(type,x,y);
|
||||
for ( int i=0; i<mDesc.mItems.Size(); i++ )
|
||||
mDesc.mItems[i].OffsetPositionY(-GetMenuYOffset());
|
||||
foreach ( itm:mDesc.mItems )
|
||||
itm.OffsetPositionY(-GetMenuYOffset());
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
|
@ -432,9 +432,8 @@ Class SWWMBigMenuHack : SWWMCleanMenu
|
|||
}
|
||||
// realign everything to be vertically centered
|
||||
int ntext = 0;
|
||||
for ( int i=0; i<mDesc.mItems.Size(); i++ )
|
||||
foreach ( itm:mDesc.mItems )
|
||||
{
|
||||
let itm = mDesc.mItems[i];
|
||||
if ( (itm.GetClass() == 'ListMenuItemSWWMTextItemM') || (itm.GetClass() == 'ListMenuItemSWWMPatchItemM') )
|
||||
ntext++;
|
||||
}
|
||||
|
|
@ -448,9 +447,9 @@ Class SWWMBigMenuHack : SWWMCleanMenu
|
|||
if ( h == -1 ) h = 200;
|
||||
double oy = int((h-theight)/2);
|
||||
// apply offsets
|
||||
for ( int i=0, j=0; i<mDesc.mItems.Size(); i++ )
|
||||
int j = 0;
|
||||
foreach ( itm:mDesc.mItems )
|
||||
{
|
||||
let itm = mDesc.mItems[i];
|
||||
if ( (itm.GetClass() == 'ListMenuItemSWWMTextItemM') || (itm.GetClass() == 'ListMenuItemSWWMPatchItemM') )
|
||||
{
|
||||
itm.OffsetPositionY(oy+56); // offset from static text header
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue