Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Botpack.LMSScoreBoard


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
//=============================================================================
// LMSScoreBoard
//=============================================================================
class LMSScoreBoard extends TournamentScoreBoard;

var localized string VictoryGoal;

function DrawCategoryHeaders(Canvas Canvas)
{
    local float Offset, XL, YL;

    Offset = Canvas.CurY;
    Canvas.DrawColor = WhiteColor;

    Canvas.StrLen(PlayerString, XL, YL);
    Canvas.SetPos((Canvas.ClipX / 8)*2 - XL/2, Offset);
    Canvas.DrawText(PlayerString);

    Canvas.StrLen(FragsString, XL, YL);
    Canvas.SetPos((Canvas.ClipX / 8)*6 - XL/2, Offset);
    Canvas.DrawText(FragsString);

    if (Level.NetMode != NM_StandAlone)
    {
        Canvas.StrLen(PingString, XL, YL);
        Canvas.SetPos((Canvas.ClipX / 8)*7 - XL/2, Offset);
        Canvas.DrawText(PingString);
    }
}

function DrawNameAndPing(Canvas Canvas, PlayerReplicationInfo PRI, float XOffset, float YOffset, bool bCompressed)
{
    local float XL, YL, XL2;
    local Font CanvasFont;

    // Draw Name
    if ( PRI.bAdmin )
        Canvas.DrawColor = WhiteColor;
    else if (PRI.PlayerName == Pawn(Owner).PlayerReplicationInfo.PlayerName)
        Canvas.DrawColor = GoldColor;
    else 
        Canvas.DrawColor = CyanColor;
    Canvas.SetPos((Canvas.ClipX / 8) * 1.5, YOffset);
    Canvas.DrawText(PRI.PlayerName, False);

    Canvas.StrLen( "0000", XL, YL );

    // Draw Score
    if ( PRI.Score < 1 )
        Canvas.DrawColor = LightCyanColor;
    else
        Canvas.DrawColor = GoldColor;
    Canvas.StrLen( int(PRI.Score), XL2, YL );
    Canvas.SetPos( (Canvas.ClipX / 8) * 6 + XL/2 - XL2, YOffset );
    Canvas.DrawText( int(PRI.Score), false );

    if (Level.NetMode != NM_Standalone)
    {
        // Draw Ping
        Canvas.DrawColor = LightCyanColor;
        Canvas.StrLen( PRI.Ping, XL2, YL );
        Canvas.SetPos( (Canvas.ClipX / 8) * 7 + XL/2 - XL2, YOffset );
        Canvas.DrawText( PRI.Ping, false );
    }
}

function DrawVictoryConditions(Canvas Canvas)
{
    Canvas.DrawText(VictoryGoal);
}

defaultproperties
{
     VictoryGoal="Be the last one alive!"
     FragsString="Lives"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Do 19.5.2005 19:42:14.000 - Creation time: Fr 7.6.2013 13:15:49.266 - Created with UnCodeX