Ok I'm trying to emulate the Function Display using SSH's Sprite Font script module.
In GlobalScript.asc I have....
Code: ags
In my room Script I have
Code: ags
But I get the Error "Cannot Declar Pointer to non-managed type?"
at "import function DisplayFont( String txt, int x=0, int y=0, SpriteFont *Font=null );"
Can anyone help me?
In GlobalScript.asc I have....
SpriteFont Courier;
function DisplayFont( String txt, int x=0, int y=0, SpriteFont *Font=null ){
int txtwidth;
DrawingSurface *Screen=Room.GetDrawingSurfaceForBackground();
if(*Font != null){
*Font=Courier;
}
if((x == 0) && (y == 0)){
y = 121;
txtwidth = Font.GetSpriteTextRawWidth(txt);
x= FloatToInt((400-(txtwith * 0.5)), eRoundUp);
}
Font.TextOnBackground(x, y, txt);
WaitMouseKey();
Screen.Release();
}
.
.
.
.
.
export Courier;
export DisplayFont( String txt, int x=0, int y=0, SpriteFont *Font=null );
In my room Script I have
import SpriteFont Courier;
import function DisplayFont( String txt, int x=0, int y=0, SpriteFont *Font=null );
.
.
.
function hStool_Look(){
DisplayFont("UMMM.... ITS A STOOL GENIUS. YOU SIT ON IT.");
}
But I get the Error "Cannot Declar Pointer to non-managed type?"
at "import function DisplayFont( String txt, int x=0, int y=0, SpriteFont *Font=null );"
Can anyone help me?