Code: Select all
Procedure updateProgressBar(barNum, imageNum, amount, max, fColor, bColor, tColor, txt.s )
Protected iw = ImageWidth(imageNum), ih = ImageHeight(imageNum), tw, th
StartDrawing(ImageOutput(imageNum))
Box(0, 0, iw, ih, fColor)
Box(0, 0, amount / (max / iw), ih, bColor)
DrawingMode(#PB_2DDrawing_Transparent)
; txt + " " + LSet(Str(amount * 100/max), 2, "0") + "%"
tw = TextWidth(txt)
th = TextHeight(txt)
DrawText((iw - tw) >> 1, (ih - th) >> 1, txt, tColor)
StopDrawing()
SetGadgetState(barNum, ImageID(imageNum))
EndProcedurereturn this error message when compilingDrawText((iw - tw) >> 1, (ih - th) >> 1, txt, tColor)
[12 :58 :53] [COMPILER] Ligne 1116: Les operateurs suivants sont indisponibles avec les nombres flottants: <<, >>, &, |, !, %.
With PB 6.10 Beta 6 there was not problem with this instruction



