Initial prep work for Japanese.
Added some needed extra glyphs to the MPlus font. Separated language files. Added edited cluster messages for Ultimate Doom, Doom 2, Heretic and Hexen.
This commit is contained in:
parent
eb7a09233e
commit
0076aac629
14 changed files with 2942 additions and 2118 deletions
|
|
@ -613,8 +613,8 @@ Class SWWMOneLiner : HUDMessageBase
|
|||
{
|
||||
String whichline;
|
||||
int lifespan, curtime;
|
||||
transient Font TewiFont;
|
||||
transient CVar safezone;
|
||||
transient Font TewiFont, MPlusFont;
|
||||
transient CVar safezone, lang;
|
||||
|
||||
static SWWMOneLiner Make( String whichline, int lifespan )
|
||||
{
|
||||
|
|
@ -634,22 +634,26 @@ Class SWWMOneLiner : HUDMessageBase
|
|||
override void Draw( int bottom, int visibility )
|
||||
{
|
||||
if ( !safezone ) safezone = CVar.GetCVar('swwm_hudmargin',players[consoleplayer]);
|
||||
if ( !lang ) lang = CVar.GetCVar('language',players[consoleplayer]);
|
||||
if ( !TewiFont ) TewiFont = Font.GetFont('TewiShaded');
|
||||
if ( !MPlusFont ) MPlusFont = Font.GetFont('MPlusShaded');
|
||||
int margin = safezone.GetInt();
|
||||
Vector2 hs = StatusBar.GetHUDScale();
|
||||
Vector2 ss = (Screen.GetWidth()/hs.x,Screen.GetHeight()/hs.y);
|
||||
String loc = StringTable.Localize(whichline);
|
||||
if ( loc.Length() <= 0 ) return; // don't draw empty strings
|
||||
String locs = "\""..loc.."\"";
|
||||
String locs = StringTable.Localize("$SWWM_LQUOTE")..loc..StringTable.Localize("$SWWM_RQUOTE");
|
||||
Font fnt = TewiFont;
|
||||
if ( lang.GetString() ~== "jp" ) fnt = MPlusFont;
|
||||
// split so it can fit
|
||||
BrokenLines l = TewiFont.BreakLines(locs,int(ss.x*.5));
|
||||
BrokenLines l = fnt.BreakLines(locs,int(ss.x*.5));
|
||||
int maxlen = 0;
|
||||
for ( int i=0; i<l.Count(); i++ )
|
||||
{
|
||||
int len = TewiFont.StringWidth(l.StringAt(i));
|
||||
int len = fnt.StringWidth(l.StringAt(i));
|
||||
if ( len > maxlen ) maxlen = len;
|
||||
}
|
||||
int h = TewiFont.GetHeight();
|
||||
int h = fnt.GetHeight();
|
||||
int fh = h*l.Count();
|
||||
double alph = clamp((curtime/20.)+1.,0.,1.);
|
||||
alph *= clamp((lifespan-curtime)/10.,0.,1.);
|
||||
|
|
@ -657,8 +661,8 @@ Class SWWMOneLiner : HUDMessageBase
|
|||
int yy = margin+fh;
|
||||
for ( int i=0; i<l.Count(); i++ )
|
||||
{
|
||||
int len = TewiFont.StringWidth(l.StringAt(i));
|
||||
Screen.DrawText(TewiFont,Font.CR_FIRE,(ss.x-len)/2.,(bottom/hs.y)-yy,l.StringAt(i),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
|
||||
int len = fnt.StringWidth(l.StringAt(i));
|
||||
Screen.DrawText(fnt,Font.CR_FIRE,(ss.x-len)/2.,(bottom/hs.y)-yy,l.StringAt(i),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
|
||||
yy -= h;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
{
|
||||
TextureID StatusTex, WeaponTex, ScoreTex, InventoryTex, ChatTex[6],
|
||||
HealthTex[5], FuelTex, DashTex, EnemyBTex, EnemyHTex[5];
|
||||
HUDFont mTewiFont, mMiniwiFont;
|
||||
HUDFont mTewiFont, mMiniwiFont, mMPlusFont;
|
||||
|
||||
// "Full History" contains all messages since session start, nothing is flushed
|
||||
// this can be accessed from a section of the knowledge base
|
||||
|
|
@ -25,7 +25,7 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
SWWMHandler hnd;
|
||||
|
||||
// client cvars
|
||||
transient CVar safezone, maxchat[2], maxpick, chatduration, msgduration, pickduration, chatcol, teamcol, obitcol, critcol, pickcol, targetter, healthnums, scorenums, scorebonus, targettag;
|
||||
transient CVar safezone, maxchat[2], maxpick, chatduration, msgduration, pickduration, chatcol, teamcol, obitcol, critcol, pickcol, targetter, healthnums, scorenums, scorebonus, targettag, lang;
|
||||
|
||||
// shared stuff
|
||||
Vector2 ss, hs;
|
||||
|
|
@ -46,6 +46,14 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
|
||||
DynamicValueInterpolator HealthInter, ScoreInter, FuelInter, DashInter;
|
||||
|
||||
// returns MPlus if we're playing in Japanese, otherwise returns the requested font
|
||||
Font LangFont( HUDFont req )
|
||||
{
|
||||
if ( !lang ) lang = CVar.GetCVar('language',players[consoleplayer]);
|
||||
if ( lang.GetString() ~== "jp" ) return mMPlusFont.mFont;
|
||||
return req.mFont;
|
||||
}
|
||||
|
||||
override void FlushNotify()
|
||||
{
|
||||
// flush interpolators (useful since this virtual gets called
|
||||
|
|
@ -347,6 +355,7 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
EnemyHTex[4] = TexMan.CheckForTexture("graphics/HUD/EnemyBarS.png",TexMan.Type_Any);
|
||||
mTewiFont = HUDFont.Create("TewiShaded");
|
||||
mMiniwiFont = HUDFont.Create("MiniwiShaded");
|
||||
mMPlusFont = HUDFont.Create("MPlusShaded");
|
||||
HealthInter = DynamicValueInterpolator.Create(100,.1,1,100);
|
||||
ScoreInter = DynamicValueInterpolator.Create(0,.1,1,1000);
|
||||
FuelInter = DynamicValueInterpolator.Create(120,.5,1,100);
|
||||
|
|
@ -396,9 +405,10 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
tag = String.Format("\cx%s\c-",StringTable.Localize("$SWWM_SEXIT"));
|
||||
else tag = String.Format("\cy%s\c-",StringTable.Localize("$SWWM_NEXIT"));
|
||||
}
|
||||
Screen.DrawText(mMiniwiFont.mFont,Font.CR_WHITE,(vpos.x-hs.x*mMiniwiFont.mFont.StringWidth(tag)/2.)/hs.x,(vpos.y-hs.y*mMiniwiFont.mFont.GetHeight()/2.)/hs.y,tag,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Font fnt = LangFont(mMiniwiFont);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,(vpos.x-hs.x*fnt.StringWidth(tag)/2.)/hs.x,(vpos.y-hs.y*fnt.GetHeight()/2.)/hs.y,tag,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
tag = String.Format("\cu(%s\cu)\c-",FormatDist(tdir.length()));
|
||||
Screen.DrawText(mMiniwiFont.mFont,Font.CR_WHITE,(vpos.x-hs.x*mMiniwiFont.mFont.StringWidth(tag)/2.)/hs.x,(vpos.y+hs.y*mMiniwiFont.mFont.GetHeight()/2.)/hs.y,tag,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,(vpos.x-hs.x*fnt.StringWidth(tag)/2.)/hs.x,(vpos.y+hs.y*fnt.GetHeight()/2.)/hs.y,tag,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
}
|
||||
}
|
||||
// targetting array
|
||||
|
|
@ -423,8 +433,9 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
barsiz.y *= hs.y;
|
||||
Vector2 barpos = vpos-(barsiz/2.);
|
||||
barpos.y -= 16.;
|
||||
Font fnt = LangFont(mMiniwiFont);
|
||||
if ( targettag.GetBool() || targ.myplayer && (tag != "") )
|
||||
Screen.DrawText(mMiniwiFont.mFont,Font.CR_WHITE,(barpos.x+barsiz.x/2.-(mMiniwiFont.mFont.StringWidth(tag)*hs.x)/2.)/hs.x,(barpos.y-mMiniwiFont.mFont.GetHeight()*hs.y)/hs.y,tag,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,(barpos.x+barsiz.x/2.-(fnt.StringWidth(tag)*hs.x)/2.)/hs.x,(barpos.y-fnt.GetHeight()*hs.y)/hs.y,tag,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
|
||||
Screen.DrawTexture(EnemyBTex,false,barpos.x/hs.x,barpos.y/hs.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
|
||||
int ht = clamp(targ.intp.GetValue(),0,targ.maxhealth*10);
|
||||
int hw = int((min(ht,targ.maxhealth)*50.)/targ.maxhealth);
|
||||
|
|
@ -490,8 +501,9 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
fo.y = ((snum.initialspan-(snum.lifespan-fractic))**1.2)-boostup*sin((90./snum.initialspan)*(level.maptime+fractic-snum.starttic));
|
||||
}
|
||||
else fo.y = snum.initialspan-(snum.lifespan-fractic); // score rises linearly
|
||||
fo.y += snum.ofs*mMiniwiFont.mFont.GetHeight();
|
||||
Screen.DrawText(mMiniwiFont.mFont,snum.tcolor,(vpos.x-hs.x*(fo.x+mMiniwiFont.mFont.StringWidth(tag)/2.))/hs.x,(vpos.y-hs.y*(fo.y+(mMiniwiFont.mFont.GetHeight()/2.)))/hs.y,tag,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
|
||||
Font fnt = (snum.str!="")?LangFont(mMiniwiFont):mMiniwiFont.mFont;
|
||||
fo.y += snum.ofs*fnt.GetHeight();
|
||||
Screen.DrawText(fnt,snum.tcolor,(vpos.x-hs.x*(fo.x+fnt.StringWidth(tag)/2.))/hs.x,(vpos.y-hs.y*(fo.y+(fnt.GetHeight()/2.)))/hs.y,tag,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -734,11 +746,12 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
if ( MainQueue[i].type < PRINT_CHAT ) curtime += 35*msgduration.GetInt();
|
||||
else curtime += 35*chatduration.GetInt();
|
||||
double alph = clamp(curtime/20.,0.,1.);
|
||||
BrokenLines l = mTewiFont.mFont.BreakLines(cstr,smol?211:361);
|
||||
Font fnt = LangFont(mTewiFont);
|
||||
BrokenLines l = fnt.BreakLines(cstr,smol?211:361);
|
||||
for ( int j=0; j<l.Count(); j++ )
|
||||
{
|
||||
Screen.DrawTexture(ChatTex[smol?4:1],false,xx,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(mTewiFont.mFont,col,xx+4,yy,l.StringAt(j),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
|
||||
Screen.DrawText(fnt,col,xx+4,yy,l.StringAt(j),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
|
||||
yy += 13;
|
||||
}
|
||||
}
|
||||
|
|
@ -756,21 +769,22 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
if ( PickupQueue[i].rep > 1 ) cstr.AppendFormat(" (x%d)",PickupQueue[i].rep);
|
||||
int curtime = (PickupQueue[i].tic+35*pickduration.GetInt())-level.maptime;
|
||||
double alph = clamp(curtime/20.,0.,1.);
|
||||
BrokenLines l = mTewiFont.mFont.BreakLines(cstr,int(ss.x*.75));
|
||||
Font fnt = LangFont(mTewiFont);
|
||||
BrokenLines l = fnt.BreakLines(cstr,int(ss.x*.75));
|
||||
int maxlen = 0;
|
||||
for ( int j=0; j<l.Count(); j++ )
|
||||
{
|
||||
int len = mTewiFont.mFont.StringWidth(l.StringAt(j));
|
||||
int len = fnt.StringWidth(l.StringAt(j));
|
||||
if ( len > maxlen ) maxlen = len;
|
||||
}
|
||||
int h = mTewiFont.mFont.GetHeight();
|
||||
int h = fnt.GetHeight();
|
||||
double xx = (ss.x-maxlen)/2.;
|
||||
Screen.Dim("Black",.8*alph,int((xx-6)*hs.x),int((yy-h*(l.Count()-1))*hs.y),int((maxlen+12)*hs.x),int((h*l.Count()+4)*hs.y));
|
||||
for ( int j=l.Count()-1; j>=0; j-- )
|
||||
{
|
||||
int len = mTewiFont.mFont.StringWidth(l.StringAt(j));
|
||||
int len = fnt.StringWidth(l.StringAt(j));
|
||||
xx = (ss.x-len)/2.;
|
||||
Screen.DrawText(mTewiFont.mFont,pickcol.GetInt(),xx,yy+2,l.StringAt(j),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
|
||||
Screen.DrawText(fnt,pickcol.GetInt(),xx,yy+2,l.StringAt(j),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
|
||||
yy -= h;
|
||||
}
|
||||
yy -= 6;
|
||||
|
|
@ -789,19 +803,20 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
String pname = players[consoleplayer].GetUserName();
|
||||
// strip colors
|
||||
SWWMUtility.StripColor(pname);
|
||||
String fullstr = String.Format("\cq%s\cd@\cqdemolitionist%d\cn ~ \c-wall %s%s",pname,consoleplayer+1,txt,mTewiFont.mFont.GetCursor());
|
||||
String fullstr = String.Format("\cq%s\cd@\cqdemolitionist%d\cn ~ \c-wall %s%s_",pname,consoleplayer+1,txt);
|
||||
Font fnt = LangFont(mTewiFont);
|
||||
// cut out to fit
|
||||
int w = mTewiFont.mFont.StringWidth(fullstr);
|
||||
int w = fnt.StringWidth(fullstr);
|
||||
if ( w > ss.x-4 )
|
||||
{
|
||||
// draw trailing dots
|
||||
Screen.DrawText(mTewiFont.mFont,Font.CR_WHITE,xx,yy,"...",DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,xx,yy,"...",DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
// shift back
|
||||
xx -= w-(ss.x-4);
|
||||
// draw trimmed
|
||||
Screen.DrawText(mTewiFont.mFont,Font.CR_WHITE,xx,yy,fullstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ClipLeft,int(26*hs.x));
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,xx,yy,fullstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ClipLeft,int(26*hs.x));
|
||||
}
|
||||
else Screen.DrawText(mTewiFont.mFont,Font.CR_WHITE,xx,yy,fullstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
else Screen.DrawText(fnt,Font.CR_WHITE,xx,yy,fullstr,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -819,6 +834,7 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
double alph;
|
||||
int len;
|
||||
double xx, yy;
|
||||
Font fnt;
|
||||
if ( demo.player.viewheight <= 6 )
|
||||
{
|
||||
Screen.Dim("Black",min(demo.deadtimer/80.,1.),0,0,Screen.GetWidth(),Screen.GetHeight());
|
||||
|
|
@ -826,32 +842,36 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
{
|
||||
Screen.Dim("Red",clamp((demo.revivefail-level.maptime)/60.,0.,.2),0,0,Screen.GetWidth(),Screen.GetHeight());
|
||||
str = StringTable.Localize("$SWWM_REFAIL");
|
||||
len = mTewiFont.mFont.StringWidth(str);
|
||||
fnt = LangFont(mTewiFont);
|
||||
len = fnt.StringWidth(str);
|
||||
xx = (ss.x-len)/2.;
|
||||
yy = ss.y-48;
|
||||
if ( (gametic%16) < 8 )
|
||||
Screen.DrawText(mTewiFont.mFont,Font.CR_RED,xx,yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_RED,xx,yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
}
|
||||
alph = clamp((demo.deadtimer-60)/60.,0.,1.);
|
||||
str = String.Format(StringTable.Localize("$SWWM_URDED"),CPlayer.GetUserName());
|
||||
len = mTewiFont.mFont.StringWidth(str);
|
||||
fnt = LangFont(mTewiFont);
|
||||
len = fnt.StringWidth(str);
|
||||
xx = (ss.x-len)/2.;
|
||||
yy = (ss.y-mTewiFont.mFont.GetHeight()*4)/2.;
|
||||
Screen.DrawText(mTewiFont.mFont,Font.CR_RED,xx,yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
|
||||
yy = (ss.y-fnt.GetHeight()*4)/2.;
|
||||
Screen.DrawText(fnt,Font.CR_RED,xx,yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
|
||||
alph = clamp((demo.deadtimer-140)/60.,0.,1.);
|
||||
str = String.Format(StringTable.Localize("$SWWM_URDED2"),CPlayer.GetUserName());
|
||||
len = mTewiFont.mFont.StringWidth(str);
|
||||
fnt = LangFont(mTewiFont);
|
||||
len = fnt.StringWidth(str);
|
||||
xx = (ss.x-len)/2.;
|
||||
yy = ss.y/2.;
|
||||
Screen.DrawText(mTewiFont.mFont,Font.CR_WHITE,xx,yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,xx,yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
|
||||
if ( !swwm_revive )
|
||||
return;
|
||||
alph = clamp((demo.deadtimer-160)/60.,0.,1.);
|
||||
str = String.Format(StringTable.Localize("$SWWM_URDED3"),CPlayer.GetUserName());
|
||||
len = mTewiFont.mFont.StringWidth(str);
|
||||
fnt = LangFont(mTewiFont);
|
||||
len = fnt.StringWidth(str);
|
||||
xx = (ss.x-len)/2.;
|
||||
yy = (ss.y+mTewiFont.mFont.GetHeight()*2)/2.;
|
||||
Screen.DrawText(mTewiFont.mFont,Font.CR_WHITE,xx,yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
|
||||
yy = (ss.y+fnt.GetHeight()*2)/2.;
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,xx,yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,13 +11,15 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
TAB_STORE,
|
||||
TAB_TRADING,
|
||||
TAB_CHAT,
|
||||
TAB_SECRET
|
||||
TAB_SECRET,
|
||||
TAB_HELP
|
||||
};
|
||||
|
||||
TextureID MainWindow, TabSeparator, WindowSeparator, WindowSeparatorH,
|
||||
FancyBg, EasterEgg, LoreSeparator;
|
||||
Font TewiFont;
|
||||
int curtab;
|
||||
FancyBg, EasterEgg, LoreSeparator, LoreSeparatorW;
|
||||
transient CVar lang;
|
||||
transient Font TewiFont, MPlusFont;
|
||||
int curtab, oldtab;
|
||||
// for scrolling
|
||||
bool sub;
|
||||
int sel0, sel1, sel2;
|
||||
|
|
@ -52,6 +54,14 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
// seeeeecret
|
||||
int kcode;
|
||||
|
||||
// returns MPlus if we're playing in Japanese, otherwise returns the requested font
|
||||
Font LangFont( Font req )
|
||||
{
|
||||
if ( !lang ) lang = CVar.GetCVar('language',players[consoleplayer]);
|
||||
if ( lang.GetString() ~== "jp" ) return MPlusFont;
|
||||
return req;
|
||||
}
|
||||
|
||||
override void Init( Menu parent )
|
||||
{
|
||||
Super.Init(parent);
|
||||
|
|
@ -62,6 +72,7 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
return;
|
||||
}
|
||||
TewiFont = Font.GetFont('TewiShaded');
|
||||
MPlusFont = Font.GetFont('MPlusShaded');
|
||||
FancyBg = TexMan.CheckForTexture("graphics/tempbg.png",TexMan.Type_MiscPatch);
|
||||
MainWindow = TexMan.CheckForTexture("graphics/KBase/MainWindow.png",TexMan.Type_MiscPatch);
|
||||
TabSeparator = TexMan.CheckForTexture("graphics/KBase/TabSeparator.png",TexMan.Type_MiscPatch);
|
||||
|
|
@ -69,6 +80,7 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
WindowSeparatorH = TexMan.CheckForTexture("graphics/KBase/WindowSeparatorH.png",TexMan.Type_MiscPatch);
|
||||
EasterEgg = TexMan.CheckForTexture("graphics/KBase/Drawing.png",TexMan.Type_MiscPatch);
|
||||
LoreSeparator = TexMan.CheckForTexture("graphics/KBase/LibraryTabSeparator.png",TexMan.Type_MiscPatch);
|
||||
LoreSeparatorW = TexMan.CheckForTexture("graphics/KBase/LibraryTabSeparatorJP.png",TexMan.Type_MiscPatch);
|
||||
curtab = CVar.GetCVar('swwm_lasttab',players[consoleplayer]).GetInt();
|
||||
if ( (curtab < 0) || (curtab > 7) ) curtab = 0;
|
||||
MenuSound("menu/demoopen");
|
||||
|
|
@ -80,10 +92,13 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
lorelib = SWWMLoreLibrary.Find(players[consoleplayer]);
|
||||
oldloresiz = lorelib.ent.Size();
|
||||
stats = SWWMStats.Find(players[consoleplayer]);
|
||||
tmsg = "$SWWM_MAINCONTROLS";
|
||||
tmsgtic = gametic+70;
|
||||
}
|
||||
|
||||
override bool MenuEvent( int mkey, bool fromcontroller )
|
||||
{
|
||||
Font fnt = LangFont(TewiFont);
|
||||
switch ( kcode )
|
||||
{
|
||||
case 0:
|
||||
|
|
@ -149,14 +164,25 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
storeunits.Clear();
|
||||
return true;
|
||||
case MKEY_DOWN:
|
||||
if ( curtab == TAB_MISSION )
|
||||
if ( curtab == TAB_HELP )
|
||||
{
|
||||
String str = StringTable.Localize("$SWWM_HELPTXT");
|
||||
BrokenLines l = fnt.BreakLines(str,629);
|
||||
if ( l.Count() > 28 ) l = fnt.BreakLines(str,620);
|
||||
if ( (l.Count() > 28) && (sel0 < l.Count()-28) )
|
||||
{
|
||||
MenuSound("menu/demoscroll");
|
||||
sel0++;
|
||||
}
|
||||
}
|
||||
else if ( curtab == TAB_MISSION )
|
||||
{
|
||||
String str = StringTable.Localize("$SWWM_MISSION_NONE");
|
||||
if ( gameinfo.gametype&GAME_Doom ) str = StringTable.Localize("$SWWM_MISSION_DOOM");
|
||||
else if ( gameinfo.gametype&GAME_Heretic ) str = StringTable.Localize("$SWWM_MISSION_HERETIC");
|
||||
else if ( gameinfo.gametype&GAME_Hexen ) str = StringTable.Localize("$SWWM_MISSION_HEXEN");
|
||||
BrokenLines l = TewiFont.BreakLines(str,629);
|
||||
if ( l.Count() > 28 ) l = TewiFont.BreakLines(str,620);
|
||||
BrokenLines l = fnt.BreakLines(str,629);
|
||||
if ( l.Count() > 28 ) l = fnt.BreakLines(str,620);
|
||||
if ( (l.Count() > 28) && (sel0 < l.Count()-28) )
|
||||
{
|
||||
MenuSound("menu/demoscroll");
|
||||
|
|
@ -172,11 +198,11 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
{
|
||||
if ( sub )
|
||||
{
|
||||
int ofs = TewiFont.StringWidth("********************")+12;
|
||||
if ( lorelist.Size() > 26 ) ofs += 8;
|
||||
String str = StringTable.Localize(lorelist[sel0].text);
|
||||
BrokenLines l = TewiFont.BreakLines(str,635-ofs);
|
||||
if ( l.Count() > 28 ) l = TewiFont.BreakLines(str,626-ofs);
|
||||
int ofs = fnt.StringWidth("MMMMMMMMMMMMMMMMMMMM")+12;
|
||||
if ( lorelist.Size() > 26 ) ofs += 8;
|
||||
BrokenLines l = fnt.BreakLines(str,635-ofs);
|
||||
if ( l.Count() > 28 ) l = fnt.BreakLines(str,626-ofs);
|
||||
if ( (l.Count() > 28) && (sel2 < l.Count()-28) )
|
||||
{
|
||||
MenuSound("menu/demoscroll");
|
||||
|
|
@ -207,7 +233,15 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
}
|
||||
return true;
|
||||
case MKEY_UP:
|
||||
if ( curtab == TAB_MISSION )
|
||||
if ( curtab == TAB_HELP )
|
||||
{
|
||||
if ( sel0 > 0 )
|
||||
{
|
||||
MenuSound("menu/demoscroll");
|
||||
sel0--;
|
||||
}
|
||||
}
|
||||
else if ( curtab == TAB_MISSION )
|
||||
{
|
||||
if ( sel0 > 0 )
|
||||
{
|
||||
|
|
@ -656,6 +690,24 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
switch ( ev.type )
|
||||
{
|
||||
case UIEvent.Type_KeyDown:
|
||||
if ( ev.keychar == UiEvent.Key_F1 )
|
||||
{
|
||||
if ( curtab == TAB_HELP )
|
||||
curtab = oldtab;
|
||||
else
|
||||
{
|
||||
oldtab = curtab;
|
||||
curtab = TAB_HELP;
|
||||
}
|
||||
sel0 = sel1 = sel2 = 0;
|
||||
sub = false;
|
||||
invlist.Clear();
|
||||
lorelist.Clear();
|
||||
storelist.Clear();
|
||||
storeunits.Clear();
|
||||
MenuSound("menu/demotab");
|
||||
return true;
|
||||
}
|
||||
switch ( kcode )
|
||||
{
|
||||
case 8:
|
||||
|
|
@ -691,6 +743,7 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
override void Drawer()
|
||||
{
|
||||
Super.Drawer();
|
||||
Font fnt = LangFont(TewiFont);
|
||||
String str;
|
||||
double hs = max(min(floor(Screen.GetWidth()/640.),floor(Screen.GetHeight()/400.)),1.);
|
||||
Vector2 ss = (Screen.GetWidth(),Screen.GetHeight())/hs;
|
||||
|
|
@ -703,18 +756,18 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
{
|
||||
"$SWWM_MISSTAB", "$SWWM_STATTAB", "$SWWM_INVTAB", "$SWWM_KEYTAB",
|
||||
"$SWWM_KBASETAB", "$SWWM_STORETAB", "$SWWM_TRADETAB", "$SWWM_CHATTAB",
|
||||
"$SWWM_SECRETTAB"
|
||||
"$SWWM_SECRETTAB", "$SWWM_HELPTAB"
|
||||
};
|
||||
static const string ltabnames[] =
|
||||
{
|
||||
"$SWWM_LORETAB0", "$SWWM_LORETAB1", "$SWWM_LORETAB2"
|
||||
};
|
||||
int mx = (curtab==TAB_SECRET)?9:8;
|
||||
int mx = (curtab>7)?9:8;
|
||||
for ( int i=0; i<mx; i++ )
|
||||
{
|
||||
str = StringTable.Localize(tabnames[i]);
|
||||
Screen.DrawText(TewiFont,curtab==i?Font.CR_FIRE:Font.CR_DARKGRAY,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
xx += TewiFont.StringWidth(str)+2;
|
||||
str = StringTable.Localize(tabnames[(i>7)?curtab:i]);
|
||||
Screen.DrawText(fnt,((i>7)||(curtab==i))?Font.CR_FIRE:Font.CR_DARKGRAY,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
xx += fnt.StringWidth(str)+2;
|
||||
Screen.DrawTexture(TabSeparator,false,origin.x+xx,origin.y+yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
xx += 4;
|
||||
}
|
||||
|
|
@ -723,45 +776,16 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
xx = 637-TewiFont.StringWidth(str);
|
||||
Screen.DrawText(TewiFont,Font.CR_FIRE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
// draw bottom messages
|
||||
if ( gametic < tmsgtic ) str = StringTable.Localize(tmsg);
|
||||
else
|
||||
{
|
||||
str = StringTable.Localize("$SWWM_MAINCONTROLS");
|
||||
switch ( curtab )
|
||||
{
|
||||
case TAB_INVENTORY:
|
||||
str = str..StringTable.Localize("$SWWM_LISTCONTROLS")..StringTable.Localize("$SWWM_INVCONTROLS");
|
||||
break;
|
||||
case TAB_KEYS:
|
||||
str = str..StringTable.Localize("$SWWM_LISTCONTROLS");
|
||||
break;
|
||||
case TAB_MISSION:
|
||||
case TAB_CHAT:
|
||||
str = str..StringTable.Localize("$SWWM_TEXTCONTROLS");
|
||||
break;
|
||||
case TAB_STORE:
|
||||
str = str..StringTable.Localize("$SWWM_LISTCONTROLS")..StringTable.Localize("$SWWM_STRCONTROLS");
|
||||
break;
|
||||
case TAB_TRADING:
|
||||
if ( sub )
|
||||
{
|
||||
if ( sel1 == -1 ) str = str..StringTable.Localize("$SWWM_TEXTCONTROLS")..StringTable.Localize("$SWWM_TRADECONTROLS2");
|
||||
else str = str..StringTable.Localize("$SWWM_LISTCONTROLS")..StringTable.Localize("$SWWM_TRADECONTROLS1");
|
||||
}
|
||||
else str = str..StringTable.Localize("$SWWM_TEXTCONTROLS")..StringTable.Localize("$SWWM_TRADECONTROLS0");
|
||||
break;
|
||||
case TAB_LIBRARY:
|
||||
if ( sub ) str = str..StringTable.Localize("$SWWM_TEXTCONTROLS")..StringTable.Localize("$SWWM_LORECONTROLS1");
|
||||
else str = str..StringTable.Localize("$SWWM_TEXTCONTROLS")..StringTable.Localize("$SWWM_LORECONTROLS0");
|
||||
break;
|
||||
}
|
||||
}
|
||||
xx = 4;
|
||||
yy = 386;
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
if ( gametic < tmsgtic )
|
||||
{
|
||||
str = StringTable.Localize(tmsg);
|
||||
xx = 4;
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
}
|
||||
str = String.Format("DemolitionOS %s",StringTable.Localize("$SWWM_MODVER"));
|
||||
xx = 637-TewiFont.StringWidth(str);
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
xx = 637-fnt.StringWidth(str);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
// draw contents
|
||||
if ( curtab == TAB_MISSION )
|
||||
{
|
||||
|
|
@ -769,15 +793,15 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
else if ( gameinfo.gametype&GAME_Heretic ) str = StringTable.Localize("$SWWM_MISSION_HERETIC");
|
||||
else if ( gameinfo.gametype&GAME_Hexen ) str = StringTable.Localize("$SWWM_MISSION_HEXEN");
|
||||
else str = StringTable.Localize("$SWWM_MISSION_NONE");
|
||||
BrokenLines l = TewiFont.BreakLines(str,629);
|
||||
if ( l.Count() > 28 ) l = TewiFont.BreakLines(str,620);
|
||||
BrokenLines l = fnt.BreakLines(str,629);
|
||||
if ( l.Count() > 28 ) l = fnt.BreakLines(str,620);
|
||||
xx = 6;
|
||||
yy = 17;
|
||||
int ofs = clamp(sel0,0,max(0,l.Count()-28));
|
||||
for ( int i=ofs; i<l.Count(); i++ )
|
||||
{
|
||||
if ( yy >= 370 ) break;
|
||||
Screen.DrawText(TewiFont,Font.CR_GREEN,origin.x+xx,origin.y+yy,l.StringAt(i),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_GREEN,origin.x+xx,origin.y+yy,l.StringAt(i),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 13;
|
||||
}
|
||||
// scrollbar
|
||||
|
|
@ -799,60 +823,60 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
int tmin = ((level.totaltime-stats.lastspawn)/(60*Thinker.TICRATE))%60;
|
||||
int tsec = ((level.totaltime-stats.lastspawn)/Thinker.TICRATE)%60;
|
||||
str = String.Format("\cx%s\c-%02d\cu:\c-%02d\cu:\c-%02d",StringTable.Localize("$SWWM_STATUPTIME"),thour,tmin,tsec);
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 16;
|
||||
if ( stats.grounddist > 32000. ) str = String.Format("\cx%s\c-%g\cukm\c-",StringTable.Localize("$SWWM_STATONFOOT"),stats.grounddist/32000.);
|
||||
else str = String.Format("\cx%s\c-%g\cum\c-",StringTable.Localize("$SWWM_STATONFOOT"),stats.grounddist/32.);
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 16;
|
||||
if ( stats.airdist > 32000. ) str = String.Format("\cx%s\c-%g\cukm\c-",StringTable.Localize("$SWWM_STATFLIGHT"),stats.airdist/32000.);
|
||||
else str = String.Format("\cx%s\c-%g\cum\c-",StringTable.Localize("$SWWM_STATFLIGHT"),stats.airdist/32.);
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 16;
|
||||
str = String.Format("\cx%s\c-%d",StringTable.Localize("$SWWM_STATBOOST"),stats.boostcount);
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 16;
|
||||
str = String.Format("\cx%s\c-%d",StringTable.Localize("$SWWM_STATDASH"),stats.dashcount);
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 16;
|
||||
str = String.Format("\cx%s\c-%d",StringTable.Localize("$SWWM_STATSTOMP"),stats.stompcount);
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 16;
|
||||
str = String.Format("\cx%s\c-%g\cul\c-",StringTable.Localize("$SWWM_STATFUEL"),stats.fuelusage/6.);
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 16;
|
||||
str = String.Format("\cx%s\c-%g\cukm/h\c-",StringTable.Localize("$SWWM_STATSPEED"),stats.topspeed*32000./(3600*Thinker.TICRATE));
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 16;
|
||||
thour = (stats.airtime/(3600*Thinker.TICRATE));
|
||||
tmin = (stats.airtime/(60*Thinker.TICRATE))%60;
|
||||
tsec = (stats.airtime/Thinker.TICRATE)%60;
|
||||
str = String.Format("\cx%s\c-%02d\cu:\c-%02d\cu:\c-%02d",StringTable.Localize("$SWWM_STATAIRTIME"),thour,tmin,tsec);
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 16;
|
||||
str = String.Format("\cx%s\c-%d",StringTable.Localize("$SWWM_STATKILLS"),stats.kills);
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 16;
|
||||
str = String.Format("\cx%s\c-%d",StringTable.Localize("$SWWM_STATDEATHS"),stats.deaths);
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 16;
|
||||
str = String.Format("\cx%s\c-%d",StringTable.Localize("$SWWM_STATDDEALT"),stats.damagedealt);
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 16;
|
||||
str = String.Format("\cx%s\c-%d",StringTable.Localize("$SWWM_STATDTAKEN"),stats.damagetaken);
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 16;
|
||||
str = String.Format("\cx%s\c-%d",StringTable.Localize("$SWWM_STATTDEALT"),stats.topdealt);
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 16;
|
||||
str = String.Format("\cx%s\c-%d",StringTable.Localize("$SWWM_STATTTAKEN"),stats.toptaken);
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 16;
|
||||
str = String.Format("\cx%s\c-%d",StringTable.Localize("$SWWM_STATMKILL"),stats.mkill);
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 16;
|
||||
str = String.Format("\cx%s\c-%d",StringTable.Localize("$SWWM_STATSKILL"),stats.skill);
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 16;
|
||||
str = String.Format("\cx%s\c-",StringTable.Localize("$SWWM_STATFAVWEAP"));
|
||||
if ( stats.favweapon == -1 ) str = str.."N/A";
|
||||
|
|
@ -861,10 +885,10 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
let def = GetDefaultByType(stats.wstats[stats.favweapon].w);
|
||||
str = str..def.GetTag();
|
||||
}
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 16;
|
||||
str = String.Format("\cx%s\cu¥\c-%09d",StringTable.Localize("$SWWM_STATHISCORE"),stats.hiscore);
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 16;
|
||||
}
|
||||
else if ( curtab == TAB_INVENTORY )
|
||||
|
|
@ -879,7 +903,7 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
if ( !invlist[i] ) continue;
|
||||
if ( (invlist[i] is 'Ammo') || (invlist[i].Amount > 1) || (!(invlist[i] is 'PuzzleItem') && (invlist[i].MaxAmount > 1)) ) str = String.Format("%dx %s",invlist[i].Amount,invlist[i].GetTag());
|
||||
else str = invlist[i].GetTag();
|
||||
len = TewiFont.StringWidth(str);
|
||||
len = fnt.StringWidth(str);
|
||||
if ( len > longest ) longest = len;
|
||||
int clscol = Font.CR_WHITE;
|
||||
if ( invlist[i] is 'Weapon' ) clscol = Font.CR_GOLD;
|
||||
|
|
@ -888,7 +912,7 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
else if ( (invlist[i] is 'Health') || (invlist[i] is 'HealthPickup') || (invlist[i] is 'SWWMHealth') ) clscol = Font.CR_RED;
|
||||
else if ( (invlist[i] is 'Armor') || (invlist[i] is 'SWWMSpareArmor') ) clscol = Font.CR_GREEN;
|
||||
else if ( invlist[i] is 'PuzzleItem' ) clscol = Font.CR_LIGHTBLUE;
|
||||
Screen.DrawText(TewiFont,clscol,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,(i!=sel0)?Color(128,0,0,0):Color(0,0,0,0));
|
||||
Screen.DrawText(fnt,clscol,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,(i!=sel0)?Color(128,0,0,0):Color(0,0,0,0));
|
||||
yy += 16;
|
||||
if ( yy >= 370 )
|
||||
{
|
||||
|
|
@ -919,9 +943,9 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
{
|
||||
if ( !invlist[i] ) continue;
|
||||
str = invlist[i].GetTag();
|
||||
len = TewiFont.StringWidth(str);
|
||||
len = fnt.StringWidth(str);
|
||||
if ( len > longest ) longest = len;
|
||||
Screen.DrawText(TewiFont,Font.CR_UNTRANSLATED,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,(i!=sel0)?Color(128,0,0,0):Color(0,0,0,0));
|
||||
Screen.DrawText(fnt,Font.CR_UNTRANSLATED,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,(i!=sel0)?Color(128,0,0,0):Color(0,0,0,0));
|
||||
yy += 16;
|
||||
if ( yy >= 370 )
|
||||
{
|
||||
|
|
@ -947,8 +971,9 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
yy = 14;
|
||||
// draw the category
|
||||
str = StringTable.Localize(ltabnames[sel1]);
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,"< >",DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(TewiFont,Font.CR_FIRE,origin.x+xx+(TewiFont.StringWidth("********************")-TewiFont.StringWidth(str))/2,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+yy,"<",DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx+fnt.StringWidth("MMMMMMMMMMMMMMMMMMMM")-6,origin.y+yy,">",DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_FIRE,origin.x+xx+(fnt.StringWidth("MMMMMMMMMMMMMMMMMMMM")-fnt.StringWidth(str))/2,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
// draw "unread" indicators on sides
|
||||
int ltab = sel1-1;
|
||||
if ( ltab < 0 ) ltab = 2;
|
||||
|
|
@ -960,9 +985,9 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
if ( lorelib.ent[i].tab == ltab ) lunread |= !lorelib.ent[i].read;
|
||||
if ( lorelib.ent[i].tab == rtab ) runread |= !lorelib.ent[i].read;
|
||||
}
|
||||
if ( lunread ) Screen.DrawText(TewiFont,Font.CR_GOLD,origin.x+xx,origin.y+yy," ‼",DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
if ( runread ) Screen.DrawText(TewiFont,Font.CR_GOLD,origin.x+xx,origin.y+yy," ‼ ",DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawTexture(LoreSeparator,false,origin.x,origin.y+27,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
if ( lunread ) Screen.DrawText(TewiFont,Font.CR_GOLD,origin.x+xx+6,origin.y+yy,"‼",DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
if ( runread ) Screen.DrawText(TewiFont,Font.CR_GOLD,origin.x+xx+fnt.StringWidth("MMMMMMMMMMMMMMMMMMMM")-12,origin.y+yy,"‼",DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawTexture((lang.GetString()~=="jp")?LoreSeparatorW:LoreSeparator,false,origin.x,origin.y+27,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 18;
|
||||
// draw the current entries
|
||||
int ofs = max(0,sel0-26);
|
||||
|
|
@ -970,11 +995,13 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
{
|
||||
if ( yy > 370 ) break;
|
||||
str = StringTable.Localize(lorelist[i].tag);
|
||||
if ( !lorelist[i].read ) str = str.." \cf‼\c-";
|
||||
Screen.DrawText(TewiFont,(i==sel0)?Font.CR_FIRE:Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
int len = fnt.StringWidth(str);
|
||||
Screen.DrawText(fnt,(i==sel0)?Font.CR_FIRE:Font.CR_WHITE,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
if ( !lorelist[i].read )
|
||||
Screen.DrawText(TewiFont,Font.CR_GOLD,origin.x+xx+len,origin.y+yy," ‼",DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 13;
|
||||
}
|
||||
xx += TewiFont.StringWidth("********************")+2;
|
||||
xx += fnt.StringWidth("MMMMMMMMMMMMMMMMMMMM")+2;
|
||||
Screen.DrawTexture(WindowSeparator,false,origin.x+xx,origin.y+14,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
xx += 3;
|
||||
// scrollbar
|
||||
|
|
@ -992,18 +1019,18 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
if ( !sub )
|
||||
{
|
||||
str = StringTable.Localize("$SWWM_LOREUNSEL");
|
||||
Screen.DrawText(TewiFont,Font.CR_FIRE,origin.x+xx+((634-xx)-TewiFont.StringWidth(str))/2.,(ss.y-TewiFont.GetHeight())/2.,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_FIRE,origin.x+xx+((634-xx)-fnt.StringWidth(str))/2.,(ss.y-fnt.GetHeight())/2.,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
return;
|
||||
}
|
||||
str = StringTable.Localize(lorelist[sel0].text);
|
||||
BrokenLines l = TewiFont.BreakLines(str,int(635-xx));
|
||||
if ( l.Count() > 28 ) l = TewiFont.BreakLines(str,int(626-xx));
|
||||
BrokenLines l = fnt.BreakLines(str,int(635-xx));
|
||||
if ( l.Count() > 28 ) l = fnt.BreakLines(str,int(626-xx));
|
||||
yy = 17;
|
||||
ofs = clamp(sel2,0,max(0,l.Count()-28));
|
||||
for ( int i=ofs; i<l.Count(); i++ )
|
||||
{
|
||||
if ( yy > 370 ) break;
|
||||
Screen.DrawText(TewiFont,Font.CR_GREEN,origin.x+xx,origin.y+yy,l.StringAt(i),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_GREEN,origin.x+xx,origin.y+yy,l.StringAt(i),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 13;
|
||||
}
|
||||
// scrollbar
|
||||
|
|
@ -1021,7 +1048,7 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
if ( storelist.Size() <= 0 )
|
||||
{
|
||||
str = StringTable.Localize("$SWWM_NOSTORE");
|
||||
Screen.DrawText(TewiFont,Font.CR_FIRE,(ss.x-TewiFont.StringWidth(str))/2.,(ss.y-TewiFont.GetHeight())/2.,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_FIRE,(ss.x-fnt.StringWidth(str))/2.,(ss.y-fnt.GetHeight())/2.,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
return;
|
||||
}
|
||||
// draw all the stuff in the store
|
||||
|
|
@ -1037,7 +1064,7 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
let def = GetDefaultByType(storelist[i]);
|
||||
if ( storeunits[i] > 1 ) str = String.Format("%dx %s",storeunits[i],def.GetTag());
|
||||
else str = def.GetTag();
|
||||
len = TewiFont.StringWidth(str);
|
||||
len = fnt.StringWidth(str);
|
||||
if ( len > longest ) longest = len;
|
||||
collen[cols-1] = longest;
|
||||
int clscol = Font.CR_WHITE;
|
||||
|
|
@ -1046,7 +1073,7 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
else if ( (storelist[i] is 'PowerupGiver') || (storelist[i] is 'AmmoFabricator') || def.bBIGPOWERUP ) clscol = Font.CR_PURPLE;
|
||||
else if ( (storelist[i] is 'Health') || (storelist[i] is 'HealthPickup') || (storelist[i] is 'SWWMHealth') ) clscol = Font.CR_RED;
|
||||
else if ( (storelist[i] is 'Armor') || (storelist[i] is 'SWWMSpareArmor') ) clscol = Font.CR_GREEN;
|
||||
Screen.DrawText(TewiFont,clscol,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,(i!=sel0)?Color(128,0,0,0):Color(0,0,0,0));
|
||||
Screen.DrawText(fnt,clscol,origin.x+xx,origin.y+yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,(i!=sel0)?Color(128,0,0,0):Color(0,0,0,0));
|
||||
yy += 16;
|
||||
if ( yy >= 370 )
|
||||
{
|
||||
|
|
@ -1091,7 +1118,7 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
else if ( curtab == TAB_TRADING )
|
||||
{
|
||||
str = StringTable.Localize("$SWWM_COMINGSOON");
|
||||
Screen.DrawText(TewiFont,Font.CR_FIRE,(ss.x-TewiFont.StringWidth(str))/2.,(ss.y-TewiFont.GetHeight())/2.,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_FIRE,(ss.x-fnt.StringWidth(str))/2.,(ss.y-fnt.GetHeight())/2.,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
}
|
||||
else if ( curtab == TAB_CHAT )
|
||||
{
|
||||
|
|
@ -1108,12 +1135,12 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
int tmin = (bar.FullHistory[i].tic/(60*Thinker.TICRATE))%60;
|
||||
int tsec = (bar.FullHistory[i].tic/Thinker.TICRATE)%60;
|
||||
str = String.Format("\cu[\c-%02d\cu:\c-%02d\cu:\c-%02d\cu]\c- ",thour,tmin,tsec);
|
||||
BrokenLines l = TewiFont.BreakLines(bar.FullHistory[i].str,626-margin);
|
||||
BrokenLines l = fnt.BreakLines(bar.FullHistory[i].str,626-margin);
|
||||
double by = yy-13*l.Count();
|
||||
if ( by < 17 ) break;
|
||||
Screen.DrawText(TewiFont,Font.CR_WHITE,origin.x+xx,origin.y+by,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
for ( int j=0; j<l.Count(); j++ )
|
||||
Screen.DrawText(TewiFont,col,origin.x+xx+margin,origin.y+by+j*13,l.StringAt(j),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,col,origin.x+xx+margin,origin.y+by+j*13,l.StringAt(j),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy = by;
|
||||
}
|
||||
// scrollbar
|
||||
|
|
@ -1128,10 +1155,37 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
}
|
||||
else if ( curtab == TAB_SECRET )
|
||||
{
|
||||
// hidden secret tab
|
||||
Screen.DrawTexture(EasterEgg,false,origin.x+20,origin.y+40,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
str = StringTable.Localize("$SWWM_TODEMO");
|
||||
Screen.DrawText(TewiFont,Font.CR_FIRE,origin.x+(640-TewiFont.StringWidth(str))/2.,origin.y+350,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
Screen.DrawText(fnt,Font.CR_FIRE,origin.x+(640-fnt.StringWidth(str))/2.,origin.y+350,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
}
|
||||
else if ( curtab == TAB_HELP )
|
||||
{
|
||||
// help tab
|
||||
int k1, k2;
|
||||
[k1, k2] = bindings.GetKeysForCommand("openmenu SWWMKnowledgeBaseMenu");
|
||||
String kstr = bindings.NameKeys(k1,k2);
|
||||
str = String.Format(StringTable.Localize("$SWWM_HELPTXT"),kstr);
|
||||
BrokenLines l = fnt.BreakLines(str,629);
|
||||
if ( l.Count() > 28 ) l = fnt.BreakLines(str,620);
|
||||
xx = 6;
|
||||
yy = 17;
|
||||
int ofs = clamp(sel0,0,max(0,l.Count()-28));
|
||||
for ( int i=ofs; i<l.Count(); i++ )
|
||||
{
|
||||
if ( yy >= 370 ) break;
|
||||
Screen.DrawText(fnt,Font.CR_GREEN,origin.x+xx,origin.y+yy,l.StringAt(i),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += 13;
|
||||
}
|
||||
// scrollbar
|
||||
if ( l.Count() > 28 )
|
||||
{
|
||||
Screen.DrawTexture(WindowSeparator,false,origin.x+631,origin.y+14,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
xx = 634;
|
||||
int szr = l.Count()-28;
|
||||
yy = floor(ofs*(353./szr))+17;
|
||||
Screen.DrawText(TewiFont,Font.CR_FIRE,origin.x+xx,origin.y+yy,"▮",DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1252,6 +1306,8 @@ Class OptionMenuItemSWWMVoiceOption : OptionMenuItemOptionBase
|
|||
Class SWWMOptionMenu : OptionMenu
|
||||
{
|
||||
private String ttip;
|
||||
transient CVar lang;
|
||||
transient Font TewiFont, MPlusFont;
|
||||
|
||||
override void Ticker()
|
||||
{
|
||||
|
|
@ -1296,7 +1352,11 @@ Class SWWMOptionMenu : OptionMenu
|
|||
break;
|
||||
}
|
||||
}
|
||||
let fnt = Font.GetFont('Tewi');
|
||||
if ( !TewiFont ) TewiFont = Font.GetFont('Tewi');
|
||||
if ( !MPlusFont ) MPlusFont = Font.GetFont('MPlus');
|
||||
if ( !lang ) lang = CVar.GetCVar('language',players[consoleplayer]);
|
||||
Font fnt = TewiFont;
|
||||
if ( lang.GetString() ~== "jp" ) fnt = MPlusFont;
|
||||
let lines = fnt.BreakLines(ttip,CleanWidth_1-8);
|
||||
int height = (8+fnt.GetHeight()*lines.Count())*CleanYFac_1;
|
||||
// draw at the bottom unless the selected option could is covered by the tooltip
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue