I have drawn my own status display and I want the text to fade in different colors but the text don´t fade, it shows up in white all the time.
What have I done wrong?
I have pasted the code here:
class DJHUD expands ChallengeHUD;
var int X,Y,R,G,B;
var string spread;
function PostRender(canvas C)
{
Super.PostRender(C);
X=0;
Y=C.ClipY/2;
C.SetPos(X, Y);
for(R=0;R<255;R++)
{
if (R==255)
{
R=0;
}
C.DrawColor.R=R;
}
for(G=0;G<255;G++)
{
if (G==255)
{
G=0;
}
C.DrawColor.G=G;
}
for(B=0;B<255;B++)
{
if (B==255)
{
B=0;
}
C.DrawColor.B=B;
}
//C.DrawColor.R = 0;
//C.DrawColor.G = 0;
//C.DrawColor.B = 0;
C.Font = MyFonts.GetBigFont( C.ClipX );
C.DrawText( PlayerOwner.PlayerReplicationInfo.PlayerName, False );
Y=Y+30;
C.SetPos(X,Y);
DrawBigNum(C, PawnOwner.PlayerReplicationInfo.Score, X, Y);
Y=Y+30;
C.SetPos(X,Y);
if (Lead > 0)
Spread = SpreadString$" +"$Lead;
else
Spread = SpreadString$" "$Lead;
C.DrawText(Spread, False);
}
What have I done wrong?
I have pasted the code here:
class DJHUD expands ChallengeHUD;
var int X,Y,R,G,B;
var string spread;
function PostRender(canvas C)
{
Super.PostRender(C);
X=0;
Y=C.ClipY/2;
C.SetPos(X, Y);
for(R=0;R<255;R++)
{
if (R==255)
{
R=0;
}
C.DrawColor.R=R;
}
for(G=0;G<255;G++)
{
if (G==255)
{
G=0;
}
C.DrawColor.G=G;
}
for(B=0;B<255;B++)
{
if (B==255)
{
B=0;
}
C.DrawColor.B=B;
}
//C.DrawColor.R = 0;
//C.DrawColor.G = 0;
//C.DrawColor.B = 0;
C.Font = MyFonts.GetBigFont( C.ClipX );
C.DrawText( PlayerOwner.PlayerReplicationInfo.PlayerName, False );
Y=Y+30;
C.SetPos(X,Y);
DrawBigNum(C, PawnOwner.PlayerReplicationInfo.Score, X, Y);
Y=Y+30;
C.SetPos(X,Y);
if (Lead > 0)
Spread = SpreadString$" +"$Lead;
else
Spread = SpreadString$" "$Lead;
C.DrawText(Spread, False);
}