#include "Content\\ShellScripts\\stddefs.h" // This control created by brennanp 6.6.2000 ??Problems?? call x53796 // // Parameters to pass into text object // string szText //(Local Variable)The text to be displayed // int nFontID //The Path and file name of the font to be used // int nResID //The resID ID for the text to be used // int cTextColor //The color for the text // location //X,Y,Z // int nJustify //(0 = just_left,1 = just_center,2 = just_right,3 = just_all) // int nLayoutWidth //Specifying this forces the width of the margin // int nLayoutHeight //Specifying this forces the height of the margin // int nWidth //The width of the margin **(these values can be set by sending an // int nHeight //The height of the margin **nLayout version or automatically calculated using getprint) // int nBlinkRate (default = 0) //The framerate you want for this item(controls how fast the cursor blinks) // int nWrap (default = 1) //Do you want the text to wrap //How to Initialize the Text object (When using defaults some line do not have to be included) // object oText = s_Text // oText.location = // oText.nFontID = // oText.nResID = // oText.cTextColor = // (d)oText.nJustify = // oText.nLayoutWidth = // oText.nLayoutHeight = // (d)oText.nBlinkRate = // (d)oText.nWrap = // initialize(oText) //OR if you are not hooked up to a .dll replace nFontID and nResID with // oText.szFont = // oText.szText = s_Text { GUI_CREATE { string szText string szFont int nResID int nFontID int nBlinkRate = 0 int cTextColor int nColorAlpha int nJustify int nWidth int nHeight int nLayoutWidth int nLayoutHeight cube cuMargins int nWrap = 1 font3d ctFont location = 0, 0, nZ_TEXT catchup = 0 region = 0,0 to 10,10 } GUI_INIT { // //If font hasn't been initialized in script and if a Font ResID was passed in, load the font... // if (equal$(szFont, "") && nFontID) { ctFont = szPATH_FONTS localize$(nFontID) } else { ctFont = szPATH_FONTS szFont } switch (nJustify) { case 0: nJustify = just_left break case 1: nJustify = just_center break case 2: nJustify = just_right break case 3: nJustify = just_all break } // //If text hasn't been initialized in script and if a ResID was passed in, load the string... // if (equal$(szText, "") && nResID) { szText = localize$(nResID) } if (nLayoutWidth) { nWidth = nLayoutWidth } if (nLayoutHeight) { nHeight = nLayoutHeight } lprint3d_margins = 0,0 to 800,600 print3d_attributes = ctFont,cTextColor,1,0,1,0,0,nJustify if (0 == nLayoutWidth) { nWidth = getprint3dwidth(szText) + 1 } if (0 == nLayoutHeight) { nHeight = getprint3dheight(szText) } cuMargins = 0,0 to nWidth, nHeight framerate = nBlinkRate nColorAlpha = cTextColor & 0xFF000000 } GUI_EXECUTE { if (nBlinkRate) { cTextColor = cTextColor | nColorAlpha nBlinkRate-- } else { // //Set alpha to zero so text doesn't print // cTextColor = (cTextColor & 0xFFFFFF) nBlinkRate = 4 } } GUI_DRAW { lprint3d_margins = cuMargins.p1.x, cuMargins.p1.y to cuMargins.p2.x, cuMargins.p2.y lprint3d_position = cuMargins.p1.x, cuMargins.p1.y print3d_attributes = ctFont,cTextColor,1,nWrap,1,0,0,nJustify print3D szText } }