simple DrawText()

Advanced game related topics
ChebbyShabby
Enthusiast
Enthusiast
Posts: 121
Joined: Mon Jun 26, 2006 10:47 am

simple DrawText()

Post 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()
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post 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.
Dare2 cut down to size
ChebbyShabby
Enthusiast
Enthusiast
Posts: 121
Joined: Mon Jun 26, 2006 10:47 am

Post by ChebbyShabby »

oh i see. yeah thanks. it works now
Post Reply