useless
This commit is contained in:
parent
9e20f329e4
commit
a746bef31c
1 changed files with 4 additions and 7 deletions
11
pixler.bas
11
pixler.bas
|
|
@ -76,7 +76,7 @@ dim oldheight as integer
|
||||||
oldwidth=_width
|
oldwidth=_width
|
||||||
oldheight=_height
|
oldheight=_height
|
||||||
do
|
do
|
||||||
' 1. Check for window resizing first
|
' Check for window resizing first
|
||||||
if checkresize(_source)=-1 then
|
if checkresize(_source)=-1 then
|
||||||
diffx=_width-oldwidth
|
diffx=_width-oldwidth
|
||||||
diffy=_height-oldheight
|
diffy=_height-oldheight
|
||||||
|
|
@ -86,10 +86,9 @@ do
|
||||||
oldheight=_height
|
oldheight=_height
|
||||||
end if
|
end if
|
||||||
|
|
||||||
' 2. Clear the screen BEFORE drawing anything for this frame
|
cls ,backgroundcolor1
|
||||||
line (0,0)-(_width-1,_height-1),backgroundcolor1,bf
|
|
||||||
|
|
||||||
' 3. Process all inputs and update offsets FIRST
|
' Process all inputs and update offsets
|
||||||
while _mouseinput:mw=mw+_mousewheel:wend
|
while _mouseinput:mw=mw+_mousewheel:wend
|
||||||
mouseclicked=0
|
mouseclicked=0
|
||||||
rmouseclicked=0
|
rmouseclicked=0
|
||||||
|
|
@ -98,7 +97,7 @@ do
|
||||||
mousedown=_mousebutton(1)
|
mousedown=_mousebutton(1)
|
||||||
rmousedown=_mousebutton(2)
|
rmousedown=_mousebutton(2)
|
||||||
|
|
||||||
' Panning (Middle Mouse)
|
' Panning
|
||||||
if _mousebutton(3) then
|
if _mousebutton(3) then
|
||||||
state.offsetx=state.offsetx+(_mousex-lastmx)
|
state.offsetx=state.offsetx+(_mousex-lastmx)
|
||||||
state.offsety=state.offsety+(_mousey-lastmy)
|
state.offsety=state.offsety+(_mousey-lastmy)
|
||||||
|
|
@ -150,13 +149,11 @@ do
|
||||||
end if
|
end if
|
||||||
end select
|
end select
|
||||||
|
|
||||||
' 4. Draw everything using the freshly updated math
|
|
||||||
canvas
|
canvas
|
||||||
if showtoolbox then toolbox
|
if showtoolbox then toolbox
|
||||||
if showcolorpicker then colorpicker
|
if showcolorpicker then colorpicker
|
||||||
if showcommands then commandlist
|
if showcommands then commandlist
|
||||||
|
|
||||||
' 5. Flip the buffer to the monitor cleanly
|
|
||||||
_limit 30
|
_limit 30
|
||||||
_display
|
_display
|
||||||
loop
|
loop
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue