I made this "Dibujo(guibank)" function for use in a paint program I am making. My question is to why it won't work.
Please only explain what is wrong, not how to fix it... because
it will be a vital part in a program I'm making for the Blitz Showcase, and I want it to be ENTIRELY my coding.
Thanks,
Siopses
Please only explain what is wrong, not how to fix it... because
it will be a vital part in a program I'm making for the Blitz Showcase, and I want it to be ENTIRELY my coding.
Thanks,
Siopses
;GUI ;Windows window=CreateWindow("MICHAELSOFT DIBUJO",300,400,555,555,window,15) ;Canvases canvas=CreateCanvas(0,0,430,450,window) ;Menu menu=WindowMenu(window) File=CreateMenu("FILE",1,menu) CreateMenu("END",2,File) CreateMenu("Clear",3,File) UpdateWindowMenu window ;Buttons draw=CreateButton("DRAW",450,150,50,25,window,2) canvasx=430 canvasy=450 guibank=CreateBank(24) PokeInt guibank,0,window PokeInt guibank,4,canvas PokeInt guibank,8,File PokeInt guibank,12,draw PokeInt guibank,16,canvasx PokeInt guibank,20,canvasy .begin Repeat WaitEvent() Dibujo(guibank) Until EventID()=$803 AppTitle("Quit?") blah=Proceed("Are you sure"+Chr(10)+"you want to quit?") If blah=1 Then End Else If blah<>1 Then Goto begin EndIf EndIf Function Dibujo(guibank) canvas=PeekInt(guibank,4) File=PeekInt(guibank,8) draw=PeekInt(guibank,12) canvasx=PeekInt(guibank,16) canvasy=PeekInt(guibank,20) SetBuffer CanvasBuffer(canvas) Select EventID() Case $203 If MouseX>canvasx If MouseY>canvasy If ButtonState(draw)=True Then Plot MouseX,MouseY FlipCanvas canvas EndIf EndIf EndIf End Select End Function