From 5a8cc026cb6fc591795b8b8e0abec245771889bb Mon Sep 17 00:00:00 2001 From: Ian C Date: Fri, 12 Oct 2007 23:01:07 +0000 Subject: Updates --- font_fade.bmx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'font_fade.bmx') diff --git a/font_fade.bmx b/font_fade.bmx index 62f5e82..0c9cd1b 100644 --- a/font_fade.bmx +++ b/font_fade.bmx @@ -3,12 +3,14 @@ ' ' $Id$ ' -Type FontFade +Import noddybox.bitmapfont + +Type TFontFade Field list:TList - Field font:BitmapFont + Field font:TBitmapFont - Function Create:FontFade(f:BitmapFont) - Local ff:FontFade=New FontFade + Function Create:TFontFade(f:TBitmapFont) + Local ff:TFontFade=New TFontFade ff.list=New TList ff.font=f @@ -16,7 +18,7 @@ Type FontFade Return ff End Function - Method Add(s:String, x:Float, y:Float, col:Int, a:Float, ai:Float, dx:Float, dy:Float) + Method Add(s:String, x:Float, y:Float, col:Int, a:Float=1.0, ai:Float=0.02, dx:Float=0.0, dy:Float=0.0) Local f:FontFadeEnt=New FontFadeEnt f.s=s @@ -34,7 +36,7 @@ Type FontFade list.AddLast(f) End Method - Method Centre(s:String, y:Float, col:Int, a:Float, ai:Float, dy:Float) + Method Centre(s:String, y:Float, col:Int, a:Float=1.0, ai:Float=0.02, dy:Float=0.0) Local f:FontFadeEnt=New FontFadeEnt f.s=s @@ -74,9 +76,9 @@ Type FontFade SetAlpha(f.a) If f.centre - font.CentreColoured(f.s,f.y,f.r,f.g,f.b) + font.Centre(f.s,f.y,f.r,f.g,f.b) Else - font.DrawColoured(f.s,f.x,f.y,f.r,f.g,f.b) + font.Draw(f.s,f.x,f.y,f.r,f.g,f.b) EndIf f.a:+f.ai -- cgit v1.2.3