Personal rebranding.
This commit is contained in:
parent
522384b93f
commit
21d6fbdba4
35 changed files with 32 additions and 47 deletions
|
|
@ -2,24 +2,22 @@
|
|||
Class SWWMCreditsEntry ui
|
||||
{
|
||||
String title;
|
||||
bool MariHack;
|
||||
TextureID MariSprite[15];
|
||||
TextureID Sprite;
|
||||
int sheight;
|
||||
int tics, cur;
|
||||
BrokenLines btext;
|
||||
int width, height;
|
||||
int titlecol, btextcol;
|
||||
Font mSmallFont;
|
||||
|
||||
SWWMCreditsEntry Init( String t, String b = "", int c1 = Font.CR_SAPPHIRE, int c2 = Font.CR_WHITE, bool mari = false )
|
||||
SWWMCreditsEntry Init( String t, String b = "", int c1 = Font.CR_SAPPHIRE, int c2 = Font.CR_WHITE, String s = "" )
|
||||
{
|
||||
mSmallFont = Font.GetFont('TewiFont');
|
||||
if ( mari )
|
||||
if ( s != "" )
|
||||
{
|
||||
MariHack = true;
|
||||
for ( int i=0; i<15; i++ )
|
||||
MariSprite[i] = TexMan.CheckForTexture(String.Format("graphics/Credits/MariSprite%d.png",i),TexMan.Type_Any);
|
||||
tics = 3;
|
||||
cur = 0;
|
||||
Sprite = TexMan.CheckForTexture(s,TexMan.Type_Any);
|
||||
Vector2 ofs = TexMan.GetScaledOffset(Sprite);
|
||||
sheight = int(ofs.y);
|
||||
}
|
||||
titlecol = c1;
|
||||
btextcol = c2;
|
||||
|
|
@ -58,7 +56,7 @@ Class SWWMCreditsEntry ui
|
|||
private int CalcHeight()
|
||||
{
|
||||
int h = 0;
|
||||
if ( MariHack ) h = 148;
|
||||
if ( Sprite.IsValid() ) h = sheight;
|
||||
h += mSmallFont.GetHeight();
|
||||
if ( !btext ) return h;
|
||||
h += 6;
|
||||
|
|
@ -66,26 +64,16 @@ Class SWWMCreditsEntry ui
|
|||
return h;
|
||||
}
|
||||
|
||||
void Ticker()
|
||||
{
|
||||
if ( !MariHack ) return;
|
||||
if ( tics > 0 ) tics--;
|
||||
if ( !tics )
|
||||
{
|
||||
cur = (cur+1)%15;
|
||||
tics = 3;
|
||||
}
|
||||
}
|
||||
|
||||
double Draw( Vector2 ss, double x, double y )
|
||||
{
|
||||
// don't draw if we're offscreen, saves time
|
||||
if ( (y+height < 0) || (y > ss.y) ) return height;
|
||||
double yy = y;
|
||||
if ( MariHack )
|
||||
if ( Sprite.IsValid() )
|
||||
{
|
||||
yy += 148;
|
||||
Screen.DrawTexture(MariSprite[cur],false,x,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
yy += sheight;
|
||||
Screen.DrawTexture(Sprite,true,x+1,yy+1,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_ColorOverlay,Color(255,0,0,0));
|
||||
Screen.DrawTexture(Sprite,true,x,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
}
|
||||
int w = mSmallFont.StringWidth(title);
|
||||
double xx = x-w/2;
|
||||
|
|
@ -162,7 +150,7 @@ Class SWWMCreditsMenu : GenericMenu
|
|||
slocal = StringTable.Localize("$SWWM_CLOCAL");
|
||||
spatrons = StringTable.Localize("$SWWM_CPATRON");
|
||||
sthanks = StringTable.Localize("$SWWM_CTHANK");
|
||||
cdev.Push(new("SWWMCreditsEntry").Init("Marisa Kirisame","$SWWM_CDEV2",mari:true));
|
||||
cdev.Push(new("SWWMCreditsEntry").Init("Marisa the Magician","$SWWM_CDEV2",s:"graphics/Credits/MariSprite.png"));
|
||||
cassets.Push(new("SWWMCreditsEntry").Init("Bethesda Game Studios","Fallout: New Vegas\nFallout 4"));
|
||||
cassets.Push(new("SWWMCreditsEntry").Init("Epic Games","Unreal\nUnreal Tournament\nUnreal Tournament 2004\nUnreal Tournament 3"));
|
||||
cassets.Push(new("SWWMCreditsEntry").Init("Ion Storm","Deus Ex"));
|
||||
|
|
@ -184,7 +172,7 @@ Class SWWMCreditsMenu : GenericMenu
|
|||
cfanart.Push(new("SWWMCreditsEntry").Init("Sgt. Shivers (@Sgt_Shivers_)"));
|
||||
cfanart.Push(new("SWWMCreditsEntry").Init("Moa Dixøn / Endie (@MoaDixon)"));
|
||||
cfanart.Push(new("SWWMCreditsEntry").Init("Monsoon-Soft (@MonsoonSoft)"));
|
||||
clocal.Push(new("SWWMCreditsEntry").Init("Marisa Kirisame","$SWWM_LOCES"));
|
||||
clocal.Push(new("SWWMCreditsEntry").Init("Marisa the Magician","$SWWM_LOCES"));
|
||||
cpatrons.Push(new("SWWMCreditsEntry").Init("Snacks"));
|
||||
cpatrons.Push(new("SWWMCreditsEntry").Init("john"));
|
||||
cpatrons.Push(new("SWWMCreditsEntry").Init("FireFly"));
|
||||
|
|
@ -384,7 +372,6 @@ Class SWWMCreditsMenu : GenericMenu
|
|||
spos -= speed/GameTicRate;
|
||||
if ( spos < -theight ) spos = ss.y;
|
||||
if ( spos > ss.y ) spos = -theight;
|
||||
cdev[0].Ticker();
|
||||
}
|
||||
override bool TranslateKeyboardEvents()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue