Tweak the F1 menu to always scale to factors of 640x360.
This commit is contained in:
parent
c192c22b9b
commit
87522cab3d
4 changed files with 26 additions and 36 deletions
|
|
@ -365,13 +365,7 @@ SWWM_CCOMMUNITY2 = "For helping me keep this whole thing rolling, and for all th
|
||||||
SWWM_CYOU1 = "You";
|
SWWM_CYOU1 = "You";
|
||||||
SWWM_CYOU2 = "For playing this mod, thank you so much.";
|
SWWM_CYOU2 = "For playing this mod, thank you so much.";
|
||||||
SWWM_CLOCAL = "Localization:";
|
SWWM_CLOCAL = "Localization:";
|
||||||
SWWM_LOCDE = "German";
|
|
||||||
SWWM_LOCES = "Spanish";
|
SWWM_LOCES = "Spanish";
|
||||||
SWWM_LOCFR = "French";
|
|
||||||
SWWM_LOCIT = "Italian";
|
|
||||||
SWWM_LOCJP = "Japanese";
|
|
||||||
SWWM_LOCPL = "Polish";
|
|
||||||
SWWM_LOCRU = "Russian";
|
|
||||||
// knowledge base
|
// knowledge base
|
||||||
SWWM_COMINGSOON = "(coming soon)";
|
SWWM_COMINGSOON = "(coming soon)";
|
||||||
SWWM_MISSTAB = "Mission";
|
SWWM_MISSTAB = "Mission";
|
||||||
|
|
|
||||||
|
|
@ -321,13 +321,7 @@ SWWM_CCOMMUNITY2 = "Por ayudarme a seguir trabajando en esto, y por todo el tiem
|
||||||
SWWM_CYOU1 = "Tú";
|
SWWM_CYOU1 = "Tú";
|
||||||
SWWM_CYOU2 = "Por jugar a este mod, muchísimas gracias.";
|
SWWM_CYOU2 = "Por jugar a este mod, muchísimas gracias.";
|
||||||
SWWM_CLOCAL = "Traducción:";
|
SWWM_CLOCAL = "Traducción:";
|
||||||
SWWM_LOCDE = "Alemán";
|
|
||||||
SWWM_LOCES = "Castellano";
|
SWWM_LOCES = "Castellano";
|
||||||
SWWM_LOCFR = "Francés";
|
|
||||||
SWWM_LOCIT = "Italiano";
|
|
||||||
SWWM_LOCJP = "Japonés";
|
|
||||||
SWWM_LOCPL = "Polaco";
|
|
||||||
SWWM_LOCRU = "Ruso";
|
|
||||||
// knowledge base
|
// knowledge base
|
||||||
SWWM_COMINGSOON = "(próximamente)";
|
SWWM_COMINGSOON = "(próximamente)";
|
||||||
SWWM_MISSTAB = "Misión";
|
SWWM_MISSTAB = "Misión";
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
[default]
|
[default]
|
||||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1213 \cu(vie 02 may 2025 23:48:45 CEST)\c-";
|
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1214 \cu(sáb 03 may 2025 18:44:18 CEST)\c-";
|
||||||
SWWM_SHORTVER="\cw1.3pre r1213 \cu(2025-05-02 23:48:45)\c-";
|
SWWM_SHORTVER="\cw1.3pre r1214 \cu(2025-05-03 18:44:18)\c-";
|
||||||
|
|
|
||||||
|
|
@ -36,44 +36,45 @@ Class SWWMHelpMenu : GenericMenu
|
||||||
bgtex = TexMan.CheckForTexture("graphics/tempbg.png");
|
bgtex = TexMan.CheckForTexture("graphics/tempbg.png");
|
||||||
mSmallFont = Font.GetFont('TewiFont');
|
mSmallFont = Font.GetFont('TewiFont');
|
||||||
mSmallFont2 = Font.GetFont('TewiFontOutline');
|
mSmallFont2 = Font.GetFont('TewiFontOutline');
|
||||||
|
int cropwidth = 584;
|
||||||
for ( int i=0; i<NUM_HELP_PAGES; i++ )
|
for ( int i=0; i<NUM_HELP_PAGES; i++ )
|
||||||
{
|
{
|
||||||
switch ( i )
|
switch ( i )
|
||||||
{
|
{
|
||||||
case PAGE_STORY:
|
case PAGE_STORY:
|
||||||
pagehdr[i] = StringTable.Localize("$SWWM_HELP_STORY");
|
pagehdr[i] = StringTable.Localize("$SWWM_HELP_STORY");
|
||||||
if ( gameinfo.gametype&GAME_Heretic ) pagetxt[i] = mSmallFont.BreakLines(StringTable.Localize("$SWWM_HELP_STORYHERETIC"),600);
|
if ( gameinfo.gametype&GAME_Heretic ) pagetxt[i] = mSmallFont.BreakLines(StringTable.Localize("$SWWM_HELP_STORYHERETIC"),cropwidth);
|
||||||
else if ( gameinfo.gametype&GAME_Hexen ) pagetxt[i] = mSmallFont.BreakLines(StringTable.Localize("$SWWM_HELP_STORYHEXEN"),600);
|
else if ( gameinfo.gametype&GAME_Hexen ) pagetxt[i] = mSmallFont.BreakLines(StringTable.Localize("$SWWM_HELP_STORYHEXEN"),cropwidth);
|
||||||
else if ( SWWMUtility.IsEviternity() || SWWMUtility.IsEviternityTwo() ) pagetxt[i] = mSmallFont.BreakLines(StringTable.Localize("$SWWM_HELP_STORYEVITERNITY"),600);
|
else if ( SWWMUtility.IsEviternity() || SWWMUtility.IsEviternityTwo() ) pagetxt[i] = mSmallFont.BreakLines(StringTable.Localize("$SWWM_HELP_STORYEVITERNITY"),cropwidth);
|
||||||
else pagetxt[i] = mSmallFont.BreakLines(StringTable.Localize("$SWWM_HELP_STORYDOOM"),600);
|
else pagetxt[i] = mSmallFont.BreakLines(StringTable.Localize("$SWWM_HELP_STORYDOOM"),cropwidth);
|
||||||
break;
|
break;
|
||||||
case PAGE_DEMO:
|
case PAGE_DEMO:
|
||||||
pagehdr[i] = StringTable.Localize("$SWWM_HELP_DEMO");
|
pagehdr[i] = StringTable.Localize("$SWWM_HELP_DEMO");
|
||||||
pagetxt[i] = mSmallFont.BreakLines(StringTable.Localize("$SWWM_HELP_DEMOTXT"),600);
|
pagetxt[i] = mSmallFont.BreakLines(StringTable.Localize("$SWWM_HELP_DEMOTXT"),cropwidth);
|
||||||
break;
|
break;
|
||||||
case PAGE_ARSENAL1:
|
case PAGE_ARSENAL1:
|
||||||
pagehdr[i] = StringTable.Localize("$SWWM_HELP_ARSE1");
|
pagehdr[i] = StringTable.Localize("$SWWM_HELP_ARSE1");
|
||||||
pagetxt[i] = mSmallFont.BreakLines(StringTable.Localize("$SWWM_HELP_ARSE1TXT"),600);
|
pagetxt[i] = mSmallFont.BreakLines(StringTable.Localize("$SWWM_HELP_ARSE1TXT"),cropwidth);
|
||||||
break;
|
break;
|
||||||
case PAGE_ARSENAL2:
|
case PAGE_ARSENAL2:
|
||||||
pagehdr[i] = StringTable.Localize("$SWWM_HELP_ARSE2");
|
pagehdr[i] = StringTable.Localize("$SWWM_HELP_ARSE2");
|
||||||
pagetxt[i] = mSmallFont.BreakLines(StringTable.Localize("$SWWM_HELP_ARSE2TXT"),600);
|
pagetxt[i] = mSmallFont.BreakLines(StringTable.Localize("$SWWM_HELP_ARSE2TXT"),cropwidth);
|
||||||
break;
|
break;
|
||||||
case PAGE_ARSENAL3:
|
case PAGE_ARSENAL3:
|
||||||
pagehdr[i] = StringTable.Localize("$SWWM_HELP_ARSE3");
|
pagehdr[i] = StringTable.Localize("$SWWM_HELP_ARSE3");
|
||||||
pagetxt[i] = mSmallFont.BreakLines(StringTable.Localize("$SWWM_HELP_ARSE3TXT"),600);
|
pagetxt[i] = mSmallFont.BreakLines(StringTable.Localize("$SWWM_HELP_ARSE3TXT"),cropwidth);
|
||||||
break;
|
break;
|
||||||
case PAGE_KBASE:
|
case PAGE_KBASE:
|
||||||
pagehdr[i] = StringTable.Localize("$SWWM_HELP_KBASE");
|
pagehdr[i] = StringTable.Localize("$SWWM_HELP_KBASE");
|
||||||
pagetxt[i] = mSmallFont.BreakLines(StringTable.Localize("$SWWM_HELP_KBASETXT"),600);
|
pagetxt[i] = mSmallFont.BreakLines(StringTable.Localize("$SWWM_HELP_KBASETXT"),cropwidth);
|
||||||
break;
|
break;
|
||||||
case PAGE_TECH:
|
case PAGE_TECH:
|
||||||
pagehdr[i] = StringTable.Localize("$SWWM_HELP_TECH");
|
pagehdr[i] = StringTable.Localize("$SWWM_HELP_TECH");
|
||||||
pagetxt[i] = mSmallFont.BreakLines(StringTable.Localize("$SWWM_HELP_TECHTXT"),600);
|
pagetxt[i] = mSmallFont.BreakLines(StringTable.Localize("$SWWM_HELP_TECHTXT"),cropwidth);
|
||||||
break;
|
break;
|
||||||
case PAGE_TIPS:
|
case PAGE_TIPS:
|
||||||
pagehdr[i] = StringTable.Localize("$SWWM_HELP_TIPS");
|
pagehdr[i] = StringTable.Localize("$SWWM_HELP_TIPS");
|
||||||
pagetxt[i] = mSmallFont.BreakLines(StringTable.Localize("$SWWM_HELP_TIPSTXT"),600);
|
pagetxt[i] = mSmallFont.BreakLines(StringTable.Localize("$SWWM_HELP_TIPSTXT"),cropwidth);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -166,7 +167,7 @@ Class SWWMHelpMenu : GenericMenu
|
||||||
}
|
}
|
||||||
|
|
||||||
// big bulk of code
|
// big bulk of code
|
||||||
private void DrawPage( int page, double xofs = 0., double alpha = 1. )
|
private void DrawPage( int page, double hs, double xofs = 0., double alpha = 1. )
|
||||||
{
|
{
|
||||||
int h = mSmallFont.GetHeight();
|
int h = mSmallFont.GetHeight();
|
||||||
int maxlen = 0, lh;
|
int maxlen = 0, lh;
|
||||||
|
|
@ -176,7 +177,7 @@ Class SWWMHelpMenu : GenericMenu
|
||||||
let hdr = pagehdr[page];
|
let hdr = pagehdr[page];
|
||||||
let l = pagetxt[page];
|
let l = pagetxt[page];
|
||||||
lh = l.Count()*h;
|
lh = l.Count()*h;
|
||||||
Screen.DrawText(mSmallFont2,Font.CR_FIRE,xofs+(Screen.GetWidth()-mSmallFont2.StringWidth(hdr)*CleanXFac_1)/2,(Screen.GetHeight()-(h*3+lh)*CleanYFac_1)/2,hdr,DTA_CleanNoMove_1,true,DTA_Alpha,alpha);
|
Screen.DrawText(mSmallFont2,Font.CR_FIRE,xofs+(Screen.GetWidth()-mSmallFont2.StringWidth(hdr)*hs)/2,(Screen.GetHeight()-(h*3+lh)*hs)/2,hdr,DTA_ScaleX,hs,DTA_ScaleY,hs,DTA_Alpha,alpha);
|
||||||
for ( int i=0; i<l.Count(); i++ )
|
for ( int i=0; i<l.Count(); i++ )
|
||||||
{
|
{
|
||||||
int len = l.StringWidth(i);
|
int len = l.StringWidth(i);
|
||||||
|
|
@ -184,8 +185,8 @@ Class SWWMHelpMenu : GenericMenu
|
||||||
}
|
}
|
||||||
for ( int i=0; i<l.Count(); i++ )
|
for ( int i=0; i<l.Count(); i++ )
|
||||||
{
|
{
|
||||||
Screen.DrawText(mSmallFont,Font.CR_WHITE,xofs+(Screen.GetWidth()-maxlen*CleanXFac_1)/2,(Screen.GetHeight()-lh*CleanYFac_1)/2+y,l.StringAt(i),DTA_CleanNoMove_1,true,DTA_Alpha,alpha);
|
Screen.DrawText(mSmallFont,Font.CR_WHITE,xofs+(Screen.GetWidth()-maxlen*hs)/2,(Screen.GetHeight()-lh*hs)/2+y,l.StringAt(i),DTA_ScaleX,hs,DTA_ScaleY,hs,DTA_Alpha,alpha);
|
||||||
y += h*CleanYFac_1;
|
y += h*hs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -200,21 +201,22 @@ Class SWWMHelpMenu : GenericMenu
|
||||||
}
|
}
|
||||||
else Screen.Dim(0xFF000000,.8,0,0,Screen.GetWidth(),Screen.GetHeight());
|
else Screen.Dim(0xFF000000,.8,0,0,Screen.GetWidth(),Screen.GetHeight());
|
||||||
double alph = clamp(((MenuTime()+System.GetTimeFrac())-fadetic)*(5./GameTicRate),0.,1.);
|
double alph = clamp(((MenuTime()+System.GetTimeFrac())-fadetic)*(5./GameTicRate),0.,1.);
|
||||||
if ( (prevpage == -1) || (alph >= 1.) ) DrawPage(curpage);
|
double hs = max(min(floor(Screen.GetWidth()/640.),floor(Screen.GetHeight()/360.)),1.);
|
||||||
|
if ( (prevpage == -1) || (alph >= 1.) ) DrawPage(curpage,hs);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DrawPage(prevpage,-(pagedir*alph*32)*CleanXFac_1,(1.-alph)**3);
|
DrawPage(prevpage,hs,-(pagedir*alph*32)*hs,(1.-alph)**3);
|
||||||
DrawPage(curpage,(pagedir*(1.-alph)*32)*CleanXFac_1,alph**3);
|
DrawPage(curpage,hs,(pagedir*(1.-alph)*32)*hs,alph**3);
|
||||||
}
|
}
|
||||||
int h = mSmallFont.GetHeight();
|
int h = mSmallFont.GetHeight();
|
||||||
double y = Screen.GetHeight()/2-(h*2)*CleanYFac_1;
|
double y = Screen.GetHeight()/2-(h*2)*hs;
|
||||||
for ( int i=0; i<4; i++ )
|
for ( int i=0; i<4; i++ )
|
||||||
{
|
{
|
||||||
if ( curpage > 0 )
|
if ( curpage > 0 )
|
||||||
Screen.DrawText(mSmallFont,Font.CR_GOLD,12*CleanXFac_1,y,"<",DTA_CleanNoMove_1,true);
|
Screen.DrawText(mSmallFont,Font.CR_GOLD,12*hs,y,"<",DTA_ScaleX,hs,DTA_ScaleY,hs);
|
||||||
if ( curpage < NUM_HELP_PAGES-1 )
|
if ( curpage < NUM_HELP_PAGES-1 )
|
||||||
Screen.DrawText(mSmallFont,Font.CR_GOLD,Screen.GetWidth()-18*CleanXFac_1,y,">",DTA_CleanNoMove_1,true);
|
Screen.DrawText(mSmallFont,Font.CR_GOLD,Screen.GetWidth()-18*hs,y,">",DTA_ScaleX,hs,DTA_ScaleY,hs);
|
||||||
y += h*CleanYFac_1;
|
y += h*hs;
|
||||||
}
|
}
|
||||||
Super.Drawer();
|
Super.Drawer();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue