|
Post by Rod on Jun 11, 2020 5:58:42 GMT -5
This is an extract of the rubber banding code. It runs fine on v4.5.1 but on lb5 build 351 32bit I get trailing boxes all over the screen, it seems to miss some overdrawing.
nomainwin WindowWidth = 860 WindowHeight = 500 UpperLeftX = int((DisplayWidth-WindowWidth)/2) UpperLeftY = 10 graphicbox #1.gb, 35, 30, 386, 386 open "Sprite Creator" for graphics as #1 #1 "trapclose [quit]" #1.gb "down" #1.gb "when leftButtonDown [startDraw]" wait
[startDraw] x=MouseX y=MouseY origx=x origy=y ox=x oy=y #1.gb "rule xor" #1.gb "when leftButtonMove [drawbox]" #1.gb "when leftButtonUp [endbox]" wait
[drawbox] #1.gb "place ";origx;" ";origy;" ; box ";ox;" ";oy x=MouseX y=MouseY #1.gb "place ";origx;" ";origy;" ; box ";x;" ";y ox=x oy=y wait
[endbox] #1.gb "place ";origx;" ";origy;" ; box ";x;" ";y #1.gb "rule over" #1.gb "when leftButtonUp" #1.gb "when leftButtonMove" wait
[quit] close #1 end
|
|