Not quite. Here are the two fuctions in full:
' ----------------------------
' Function : Create a Progress
' ----------------------------
Function Create:IGL_Progress(parent:Object,Caption:String,Px:Int,Py:Int,Tx:Int,Ty:Int,Value:Int=50,Maximum:Int=100)
Local NewProgress:IGL_Progress
NewProgress=New IGL_Progress
NewProgress.id=NewProgress
If parent<>Null Then
NewProgress.parent=parent
Else
NewProgress.parent=IGL_MasterWindow
EndIf
NewProgress.Caption=Caption
NewProgress.Px=Px
NewProgress.Py=Py
NewProgress.Tx=Tx
NewProgress.Ty=Ty
NewProgress.Value=Value
NewProgress.Maximum=Maximum
NewProgress.label=IGL_Label.Create(NewProgress.id,NewProgress.Caption,Tx/2,(Ty/2)-(IGL_FontHeight/2),2,IGL_ProgressLabelColor)
NewProgress.Color=IGL_Color.Create(255,255,255)
NewProgress.Blend=ALPHABLEND
NewProgress.Image_ProgressBody=IGL_LoadBorderImage(IGL_Progress_Body,Tx,Ty,IGL_Color.ARGB(IGL_ProgressBorderLightColor),IGL_Color.ARGB(IGL_ProgressBorderDarkColor),2)
Local Tmp_Value:Int=(Value*Tx)/Maximum
NewProgress.Image_ProgressBar=IGL_LoadBorderImage(IGL_Progress_Bar,Tx-2-Tmp_Value,Ty-2,Null,Null,0)
IGL_AddParent(NewProgress.parent,NewProgress.id)
Return NewProgress
End Function
' ---------------------------
' Method : Refresh a Progress
' ---------------------------
Method Refresh(WidGetID:IGL_Widget)
Local Progress_Px:Int=WidGetID.ChildPx+px
Local Progress_Py:Int=WidGetID.ChildPy+py
If Hide=False
' -----------------------------
' Test if the gadget is disable
' -----------------------------
If Disable=True Then
SetAlpha alpha/2
Else
SetAlpha alpha
EndIf
IGL_DrawImage(Image_ProgressBody,Progress_Px,Progress_Py,Color,0,Blend)
SetViewport Progress_Px+1,Progress_Py,Tx-2,Ty
Local Tmp_Value:Int=(Value*Tx)/Maximum
label.SetCaption(Caption+" "+Int((101*(Value))/Maximum)+"%")
Image_ProgressBar.width = Tx-2-Tmp_Value
IGL_DrawImage(Image_ProgressBar,Progress_Px+1+Tmp_Value,Progress_Py+1,Color,0,Blend)
EndIf
' -----------------------
' Search the widget child
' -----------------------
ChildPx=Progress_px
ChildPy=Progress_Py
IGL_RefreshChild(ChildList,Self)
IGL_HideChild(ChildList,Hide)
IGL_DisableChild(ChildList,Disable)
IGL_AlphaChild(ChildList,alpha)
' ------------------
' Reset the viewport
' ------------------
IGL_ResetGraphic()
End Method