Page 1 of 1

simple DrawText()

Posted: Wed Jun 28, 2006 10:12 am
by ChebbyShabby
this code draws the score. however, when the score has changed (for example, from 0 to 1), the '0' remains there and the '1' is simply drawn on top of it. how do i stop this so that the old score is deleted??

Code: Select all

StartDrawing(SpriteOutput(0))
  Locate(500+SpriteWidth(4)+6, 10)
  FrontColor(255, 154, 0)
  DrawingFont(UseFont(0))
      
  DrawingMode(1)
  DrawText(Str(pScore))
StopDrawing()

Posted: Wed Jun 28, 2006 10:17 am
by Dare
Hi ChebbyShabby,

Perhaps redraw the background first, either with a Box(..) command or a DrawImage(..), whatever will restore the plain state. Then draw the character.

Posted: Wed Jun 28, 2006 10:18 am
by ChebbyShabby
oh i see. yeah thanks. it works now