Just some pseudo code...
That's basically how I did my old GUI... except that 'code' doesn't work.
Global B_Norm = Normal Image Global B_Over = Mouse-over Image Global B_Down = Mouse-click Image Type Button Parent.Object Caption Identifier ;used in a Select:Case:End Select to update it X,Y,Width,Height End Type Function AddButton.Button(P.Object,Image If Not (All the parameters are true values) Then Return Null B = New Button ;Assign all the same values to the new object Return B End Function Function UpdateButtons() Local B.Button For B = Each Button Select B.Identifier Case Button type 1 ;update accordingly if (within(mousex(),mousey(),b.width,b.height)) then if (mousedown(1) or mousehit(1) then ;draw the click image else ;draw the mouse-over image endif else ;draw the normal image endif Case Button type 2 ;repeat but with slightly different stuff End Select Next Return True End Function
That's basically how I did my old GUI... except that 'code' doesn't work.