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

UnrealGame.CinematicHud


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
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
// ====================================================================
//  Class:  UnrealGame.CinematicHud
//  Parent: Engine.HUD
//
//  This is the hud used for Cinematic sequences
// ====================================================================

class CinematicHud extends HUD;

// #exec OBJ LOAD FILE=..\textures\ScopeOverlay.utx PACKAGE=ScopeOverlay

var float Delta;
var bool  bHideScope;
var float xOffsets[2];
var float xRates[2];
var float yOffsets[2];
var float yRates[2];
var bool  bInitialized;
var float Scale;

var string SubTitle;
var float SubTitleKillTime;



simulated event PostRender( canvas Canvas )
{
    local float xl,yl;
    Super.PostRender(Canvas);

    if ( Level.TimeSeconds > SubTitleKillTime )
        SubTitle = "";

    if (SubTitle != "")
    {
        Canvas.SetDrawColor(255,255,0,255);
        Canvas.Font = LoadFontStatic(6);

        Canvas.StrLen(SubTitle,xl,yl);
        if (xl>=Canvas.ClipX)
            xl = 0;
        else
            xl = (Canvas.ClipX / 2) - (xl / 2);

//        Canvas.SetPos(XL,Canvas.ClipY*0.85);
        Canvas.SetPos(0, Canvas.ClipY*0.85);
        Canvas.bCenter = true;
        Canvas.DrawText(SubTitle,false);
    }

}

simulated function DrawHUD(canvas Canvas)
{
    // Setup Timing


    if (!bInitialized)
    {
        Initialize(Canvas);
    }


    Scale = Canvas.ClipX / 1024;

    Super.DrawHud(Canvas);

    // Draw any specific sequences here
}

simulated function Initialize(canvas Canvas)
{

    if (Scale == 0)
        return;

    xOffsets[0] = -123.0*Scale;
    xRates[0]   = 512.0*Scale;
    xOffsets[1] = Canvas.ClipY+1;
    xRates[1]   = 512.0*Scale;


    yOffsets[0] = (Canvas.ClipY / 2) - (64.0*Scale);
    yOffsets[1] = yOffsets[0];
    yRates[0]   = -200.0*Scale;
    yRates[1]   = +256.0*Scale;

    bInitialized = true;

}

simulated function LocalizedMessage( class<LocalMessage> Message, optional int Switch, optional PlayerReplicationInfo RelatedPRI_1, optional PlayerReplicationInfo RelatedPRI_2, optional Object OptionalObject, optional string CriticalString )
{
    SubTitle = Message.static.GetString(switch);
    SubTitleKillTime = Level.TimeSeconds + Message.static.GetLifeTime(switch);
}

defaultproperties
{
     bHideScope=Wahr
     FontArrayNames(0)="UT2003Fonts.jFontLarge1024x768"
     FontArrayNames(1)="UT2003Fonts.jFontLarge800x600"
     FontArrayNames(2)="UT2003Fonts.jFontLarge"
     FontArrayNames(3)="UT2003Fonts.jFontMedium1024x768"
     FontArrayNames(4)="UT2003Fonts.jFontMedium800x600"
     FontArrayNames(5)="UT2003Fonts.jFontMedium"
     FontArrayNames(6)="UT2003Fonts.jFontSmall"
     FontArrayNames(7)="UT2003Fonts.jFontSmallText800x600"
     FontArrayNames(8)="UT2003Fonts.FontSmallText"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Fr 30.3.2007 08:43:40.000 - Creation time: Mo 16.4.2007 11:20:45.312 - Created with UnCodeX