Core.Object | +--GUI.GUI | +--GUI.GUIStyles
void
DrawText(Canvas Canvas, eMenuState MenuState, float left, float top, float width, float height, eTextAlign Align, string Text)
Draw(Canvas Canvas, eMenuState MenuState, float left, float top, float width, float height)
00001 // ==================================================================== 00002 // (c) 2002, Epic Games, Inc. All Rights Reserved 00003 // ==================================================================== 00004 00005 class GUIStyles extends GUI 00006 Native; 00007 00008 00009 var string KeyName; // This is the name of the style used for lookup 00010 var EMenuRenderStyle RStyles[5]; // The render styles for each state 00011 var Material Images[5]; // This array holds 1 material for each state (Blurry, Watched, Focused, Pressed, Disabled) 00012 var eImgStyle ImgStyle[5]; // How should each image for each state be drawed 00013 var Color FontColors[5]; // This array holds 1 font color for each state 00014 var Color ImgColors[5]; // This array holds 1 image color for each state 00015 var GUIFont Fonts[5]; // Holds the fonts for each state 00016 var int BorderOffsets[4]; // How thick is the border 00017 var string FontNames[5]; // Holds the names of the 5 fonts to use 00018 00019 // Set by Controller 00020 var bool bRegistered; // Used as Default only. Tells if Controller has this style registered. 00021 00022 // the OnDraw delegate Can be used to draw. Return true to skip the default draw method 00023 00024 delegate bool OnDraw(Canvas Canvas, eMenuState MenuState, float left, float top, float width, float height); 00025 delegate bool OnDrawText(Canvas Canvas, eMenuState MenuState, float left, float top, float width, float height, eTextAlign Align, string Text); 00026 00027 native function Draw(Canvas Canvas, eMenuState MenuState, float left, float top, float width, float height); 00028 native function DrawText(Canvas Canvas, eMenuState MenuState, float left, float top, float width, float height, eTextAlign Align, string Text); 00029 00030 event Initialize() 00031 { 00032 local int i; 00033 00034 // Preset all the data if needed 00035 00036 for (i=0;i<5;i++) 00037 { 00038 Fonts[i] = Controller.GetMenuFont(FontNames[i]); 00039 } 00040 } 00041 00042 00043 00044 defaultproperties 00045 { 00046 RStyles(0)=MSTY_Normal 00047 RStyles(1)=MSTY_Normal 00048 RStyles(2)=MSTY_Normal 00049 RStyles(3)=MSTY_Normal 00050 RStyles(4)=MSTY_Normal 00051 ImgStyle(0)=ISTY_Stretched 00052 ImgStyle(1)=ISTY_Stretched 00053 ImgStyle(2)=ISTY_Stretched 00054 ImgStyle(3)=ISTY_Stretched 00055 ImgStyle(4)=ISTY_Stretched 00056 FontColors(0)=(A=255) 00057 FontColors(1)=(A=255) 00058 FontColors(2)=(A=255) 00059 FontColors(3)=(A=255) 00060 FontColors(4)=(A=255) 00061 ImgColors(0)=(B=255,G=255,R=255,A=255) 00062 ImgColors(1)=(B=255,G=255,R=255,A=255) 00063 ImgColors(2)=(B=255,G=255,R=255,A=255) 00064 ImgColors(3)=(B=255,G=255,R=255,A=255) 00065 ImgColors(4)=(B=255,G=255,R=255,A=255) 00066 BorderOffsets(0)=9 00067 BorderOffsets(1)=9 00068 BorderOffsets(2)=9 00069 BorderOffsets(3)=9 00070 FontNames(0)="GUISmallFont" 00071 FontNames(1)="GUISmallFont" 00072 FontNames(2)="GUISmallFont" 00073 FontNames(3)="GUISmallFont" 00074 FontNames(4)="GUISmallFont" 00075 }