Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
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 |
//============================================================================= // HUD: Superclass of the heads-up display. //============================================================================= class HUD extends Actor abstract native config(user); //============================================================================= // Variables. var globalconfig int HudMode; var globalconfig int Crosshair; var() class<menu> MainMenuType; var() string HUDConfigWindowType; var Menu MainMenu; var array<HudOverlay> Overlays; //============================================================================= // Status drawing. simulated event PreRender( canvas Canvas ); simulated event PostRender( canvas Canvas ); simulated function InputNumber(byte F); simulated function ChangeHud(int d); simulated function ChangeCrosshair(int d); simulated function DrawCrossHair( canvas Canvas, int StartX, int StartY); simulated function Message( PlayerReplicationInfo PRI, coerce string Msg, name N ); simulated function PlayReceivedMessage( string S, string PName, ZoneInfo PZone ) { PlayerPawn(Owner).ClientMessage(S); if (PlayerPawn(Owner).bMessageBeep) PlayerPawn(Owner).PlayBeepSound(); } // DisplayMessages is called by the Console in PostRender. // It offers the HUD a chance to deal with messages instead of the // Console. Returns true if messages were dealt with. simulated function bool DisplayMessages(canvas Canvas) { return false; } // 227f: Get console message color. simulated function GetMessageColor( name MsgType, out color Colour ) { Colour.R = 255; Colour.G = 255; Colour.B = 255; } // HUD overlay API. simulated final function HudOverlay AddOverlay( class<HudOverlay> Type, optional bool bUnique ) { local int i; local HudOverlay Other; if( bUnique ) for( i=(Array_Size(Overlays)-1); i>=0; --i ) if( Overlays[i].Class==Type ) return Overlays[i]; Other = Spawn(Type,Owner); Other.myHUD = Self; Overlays[Array_Size(Overlays)] = Other; return Other; } simulated final function RemoveOverlay( HudOverlay Other ) { local int i; for( i=(Array_Size(Overlays)-1); i>=0; --i ) if( Overlays[i]==Other ) { Array_Remove(Overlays,i,1); break; } } simulated function PostRender2D( canvas Canvas, Pawn Other, vector Pos ); defaultproperties { HUDConfigWindowType="UMenu.UMenuHUDConfigCW" bHidden=True RemoteRole=ROLE_SimulatedProxy } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |