Overview | Package | Class | Source | Class tree | Glossary | Deus Ex 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 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 |
//============================================================================= // Canvas: A drawing canvas. // This is a built-in Unreal class and it shouldn't be modified. // // Notes. // To determine size of a drawable object, set Style to STY_None, // remember CurX, draw the thing, then inspect CurX and CurYL. //============================================================================= class Canvas extends Object native noexport; // Objects. #exec Font Import File=Textures\SmallFont.bmp Name=SmallFont // DEUS_EX AJY #exec Font Import File=Textures\MedFont.pcx Name=MedFont #exec Font Import File=Textures\BigFont.pcx Name=BigFont #exec new TrueTypeFontFactory Name="LargeFont" FontName="HandelGothic BT" Height=32 AntiAlias=1 XPad=2 CharactersPerPage=64 // Modifiable properties. var font Font; // Font for DrawText. var float SpaceX, SpaceY; // Spacing for after Draw*. var float OrgX, OrgY; // Origin for drawing. var float ClipX, ClipY; // Bottom right clipping region. var float CurX, CurY; // Current position for drawing. var float Z; // Z location. 1=no screenflash, 2=yes screenflash. var byte Style; // Drawing style STY_None means don't draw. var float CurYL; // Largest Y size since DrawText. var color DrawColor; // Color for drawing. var bool bCenter; // Whether to center the text. var bool bNoSmooth; // Don't bilinear filter. var const int SizeX, SizeY; // Zero-based actual dimensions. // Stock fonts. var font SmallFont; // Small system font. var font MedFont; // Medium system font. var font BigFont; // Big system font. var font LargeFont; // Large system font. // Internal. var const viewport Viewport; // Viewport that owns the canvas. var const int FramePtr; // Scene frame pointer. var const int RenderPtr; // Render device pointer, only valid during UGameEngine::Draw // native functions. native(464) final function StrLen( coerce string String, out float XL, out float YL ); native(465) final function DrawText( coerce string Text, optional bool CR ); native(466) final function DrawTile( texture Tex, float XL, float YL, float U, float V, float UL, float VL ); native(467) final function DrawActor( Actor A, bool WireFrame, optional bool ClearZ ); native(468) final function DrawTileClipped( texture Tex, float XL, float YL, float U, float V, float UL, float VL ); native(469) final function DrawTextClipped( coerce string Text, optional bool bCheckHotKey ); native(470) final function TextSize( coerce string String, out float XL, out float YL ); native(471) final function DrawClippedActor( Actor A, bool WireFrame, int X, int Y, int XB, int YB, optional bool ClearZ ); native(480) final function DrawPortal( int X, int Y, int Width, int Height, actor CamActor, vector CamLocation, rotator CamRotation, optional int FOV, optional bool ClearZ ); // UnrealScript functions. event Reset() { Font = Default.Font; SpaceX = Default.SpaceX; SpaceY = Default.SpaceY; OrgX = Default.OrgX; OrgY = Default.OrgY; CurX = Default.CurX; CurY = Default.CurY; Style = Default.Style; DrawColor = Default.DrawColor; CurYL = Default.CurYL; bCenter = false; bNoSmooth = false; Z = 1.0; } final function SetPos( float X, float Y ) { CurX = X; CurY = Y; } final function SetOrigin( float X, float Y ) { OrgX = X; OrgY = Y; } final function SetClip( float X, float Y ) { ClipX = X; ClipY = Y; } final function DrawPattern( texture Tex, float XL, float YL, float Scale ) { DrawTile( Tex, XL, YL, (CurX-OrgX)*Scale, (CurY-OrgY)*Scale, XL*Scale, YL*Scale ); } final function DrawIcon( texture Tex, float Scale ) { if ( Tex != None ) DrawTile( Tex, Tex.USize*Scale, Tex.VSize*Scale, 0, 0, Tex.USize, Tex.VSize ); } final function DrawRect( texture Tex, float RectX, float RectY ) { DrawTile( Tex, RectX, RectY, 0, 0, Tex.USize, Tex.VSize ); } defaultproperties { Z=1.000000 Style=1 DrawColor=(R=127,G=127,B=127) SmallFont=Font'Engine.SmallFont' MedFont=Font'Engine.MedFont' BigFont=Font'Engine.BigFont' LargeFont=Font'Engine.LargeFont' } |
Overview | Package | Class | Source | Class tree | Glossary | Deus Ex UnrealScript Documentation |
previous class next class | frames no frames |