# update the date display if necessary
def updateDateIfNecessary
showSeconds = true # Make it false to won't show the seconds
newDate = pbGetTimeNow.strftime(showSeconds ? "%I:%M:%S %p" : "%I:%M %p")
return false if @dateString==newDate
@dateString=newDate
overlay=@sprites["overlay"].bitmap
overlay.clear
baseColor=Color.new(72,72,72)
shadowColor=Color.new(160,160,160)
textPositions=[
[@dateString,Graphics.width/2,-2,2,baseColor,shadowColor]]
pbDrawTextPositions(overlay,textPositions)
return true
end
def pbUpdate
updateDateIfNecessary #mod