Rearrange par and total time in stat screen so it matches sidemods.
This commit is contained in:
parent
008ccd7bd4
commit
505e86cfd0
2 changed files with 21 additions and 23 deletions
|
|
@ -468,18 +468,18 @@ Class SWWMStatScreen_SP : SWWMStatScreen
|
|||
str = StringTable.Localize("$TXT_IMTIME")..":";
|
||||
len = mSmallFont.StringWidth(str);
|
||||
if ( len > maxlenl ) maxlenl = len;
|
||||
if ( wi_showtotaltime )
|
||||
{
|
||||
str = StringTable.Localize("$SCORE_TOTAL")..":"; // hey, as long as it works
|
||||
len = mSmallFont.StringWidth(str);
|
||||
if ( len > maxlenl ) maxlenl = len;
|
||||
}
|
||||
if ( wbs.partime )
|
||||
{
|
||||
str = StringTable.Localize("$TXT_IMPAR")..":";
|
||||
len = mSmallFont.StringWidth(str);
|
||||
if ( len > maxlenl ) maxlenl = len;
|
||||
}
|
||||
if ( wi_showtotaltime && (Plrs[me].stime != wbs.totaltime) )
|
||||
{
|
||||
str = StringTable.Localize("$SCORE_TOTAL")..":"; // hey, as long as it works
|
||||
len = mSmallFont.StringWidth(str);
|
||||
if ( len > maxlenl ) maxlenl = len;
|
||||
}
|
||||
// right strings
|
||||
if ( wi_percents )
|
||||
{
|
||||
|
|
@ -508,23 +508,23 @@ Class SWWMStatScreen_SP : SWWMStatScreen
|
|||
str = TimeStr(Thinker.Tics2Seconds(Plrs[me].stime));
|
||||
len = mSmallFont.StringWidth(str);
|
||||
if ( len > maxlenr ) maxlenr = len;
|
||||
if ( wi_showtotaltime )
|
||||
{
|
||||
str = TimeStr(Thinker.Tics2Seconds(wbs.totaltime));
|
||||
len = mSmallFont.StringWidth(str);
|
||||
if ( len > maxlenr ) maxlenr = len;
|
||||
}
|
||||
if ( wbs.partime )
|
||||
{
|
||||
str = TimeStr(wbs.partime/GameTicRate);
|
||||
len = mSmallFont.StringWidth(str);
|
||||
if ( len > maxlenr ) maxlenr = len;
|
||||
}
|
||||
if ( wi_showtotaltime && (Plrs[me].stime != wbs.totaltime) )
|
||||
{
|
||||
str = TimeStr(Thinker.Tics2Seconds(wbs.totaltime));
|
||||
len = mSmallFont.StringWidth(str);
|
||||
if ( len > maxlenr ) maxlenr = len;
|
||||
}
|
||||
int step = mSmallFont.GetHeight()+1;
|
||||
int nl = clamp(sp_state/2,0,4);
|
||||
if ( (nl == 4) )
|
||||
{
|
||||
if ( wi_showtotaltime ) nl++;
|
||||
if ( wi_showtotaltime && (Plrs[me].stime != wbs.totaltime) ) nl++;
|
||||
if ( wbs.partime ) nl++;
|
||||
}
|
||||
nl *= step;
|
||||
|
|
@ -540,12 +540,13 @@ Class SWWMStatScreen_SP : SWWMStatScreen
|
|||
yy += step;
|
||||
if ( sp_state >= 8 ) Screen.DrawText(mSmallFont,Font.CR_GREEN,xx,yy,StringTable.Localize("$TXT_IMTIME")..":",DTA_VirtualWidthF,ss2.x,DTA_VirtualHeightF,ss2.y,DTA_KeepRatio,true);
|
||||
yy += step;
|
||||
if ( wi_showtotaltime )
|
||||
if ( wbs.partime )
|
||||
{
|
||||
if ( sp_state >= 8 ) Screen.DrawText(mSmallFont,Font.CR_GREEN,xx,yy,StringTable.Localize("$SCORE_TOTAL")..":",DTA_VirtualWidthF,ss2.x,DTA_VirtualHeightF,ss2.y,DTA_KeepRatio,true);
|
||||
if ( sp_state >= 8 ) Screen.DrawText(mSmallFont,Font.CR_GREEN,xx,yy,StringTable.Localize("$TXT_IMPAR")..":",DTA_VirtualWidthF,ss2.x,DTA_VirtualHeightF,ss2.y,DTA_KeepRatio,true);
|
||||
yy += step;
|
||||
}
|
||||
if ( wbs.partime && (sp_state >= 8) ) Screen.DrawText(mSmallFont,Font.CR_GREEN,xx,yy,StringTable.Localize("$TXT_IMPAR")..":",DTA_VirtualWidthF,ss2.x,DTA_VirtualHeightF,ss2.y,DTA_KeepRatio,true);
|
||||
if ( wi_showtotaltime && (Plrs[me].stime != wbs.totaltime) && (sp_state >= 8) )
|
||||
Screen.DrawText(mSmallFont,Font.CR_GREEN,xx,yy,StringTable.Localize("$SCORE_TOTAL")..":",DTA_VirtualWidthF,ss2.x,DTA_VirtualHeightF,ss2.y,DTA_KeepRatio,true);
|
||||
xx = int((ss2.x+maxlen)/2);
|
||||
yy = int((ss2.y-nl)/2);
|
||||
if ( wi_percents )
|
||||
|
|
@ -603,21 +604,18 @@ Class SWWMStatScreen_SP : SWWMStatScreen
|
|||
Screen.DrawText(mSmallFont,(wbs.partime&&(cnt_time<=(wbs.partime/GameTicRate)))?Font.CR_GOLD:((wbs.sucktime>0)&&(cnt_time>(wbs.sucktime*3600)))?Font.CR_RED:Font.CR_WHITE,xx-len,yy,str,DTA_VirtualWidthF,ss2.x,DTA_VirtualHeightF,ss2.y,DTA_KeepRatio,true);
|
||||
}
|
||||
yy += step;
|
||||
if ( wi_showtotaltime )
|
||||
{
|
||||
if ( cnt_total_time >= 0 )
|
||||
{
|
||||
str = TimeStr(cnt_total_time);
|
||||
len = mSmallFont.StringWidth(str);
|
||||
Screen.DrawText(mSmallFont,Font.CR_WHITE,xx-len,yy,str,DTA_VirtualWidthF,ss2.x,DTA_VirtualHeightF,ss2.y,DTA_KeepRatio,true);
|
||||
}
|
||||
yy += step;
|
||||
}
|
||||
if ( wbs.partime && (cnt_par >= 0) )
|
||||
{
|
||||
str = TimeStr(cnt_par);
|
||||
len = mSmallFont.StringWidth(str);
|
||||
Screen.DrawText(mSmallFont,Font.CR_WHITE,xx-len,yy,str,DTA_VirtualWidthF,ss2.x,DTA_VirtualHeightF,ss2.y,DTA_KeepRatio,true);
|
||||
yy += step;
|
||||
}
|
||||
if ( wi_showtotaltime && (Plrs[me].stime != wbs.totaltime) && (cnt_total_time >= 0) )
|
||||
{
|
||||
str = TimeStr(cnt_total_time);
|
||||
len = mSmallFont.StringWidth(str);
|
||||
Screen.DrawText(mSmallFont,Font.CR_WHITE,xx-len,yy,str,DTA_VirtualWidthF,ss2.x,DTA_VirtualHeightF,ss2.y,DTA_KeepRatio,true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue