utopiah
10th November 2006, 17:41
this is an easy piece of code for people who want a clock in their game
function drawDigitalClock(Canvas)
time = os.date("%I:%M:%S")
Canvas.Font = Canvas.TinyFont
Canvas.SetDrawColor(255, 0, 0, 255)
Canvas.SetPos(10, 10)
Canvas.DrawText(time)
end
you have to call this function in your postrender
utopiah
function drawDigitalClock(Canvas)
time = os.date("%I:%M:%S")
Canvas.Font = Canvas.TinyFont
Canvas.SetDrawColor(255, 0, 0, 255)
Canvas.SetPos(10, 10)
Canvas.DrawText(time)
end
you have to call this function in your postrender
utopiah