added a bit more
This commit is contained in:
parent
d156b060a8
commit
79300e12df
1 changed files with 2 additions and 25 deletions
27
pixler.bas
27
pixler.bas
|
|
@ -73,7 +73,7 @@ sub colorpicker
|
||||||
end sub
|
end sub
|
||||||
|
|
||||||
sub canvas
|
sub canvas
|
||||||
|
line (70,0)-(_width-1,_height-20),_rgb32(64),bf
|
||||||
end sub
|
end sub
|
||||||
|
|
||||||
function icon(index as long)
|
function icon(index as long)
|
||||||
|
|
@ -160,42 +160,19 @@ function __internaluiicon&(index as long,imagehandle as long,mode as integer)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
|
||||||
FUNCTION CheckResize (CurrentScreen AS _UNSIGNED LONG)
|
FUNCTION CheckResize (CurrentScreen AS _UNSIGNED LONG) 'pulled straight out of the wiki'
|
||||||
|
|
||||||
' *** Define local variable for temporary screen
|
|
||||||
DIM TempScreen AS _UNSIGNED LONG
|
DIM TempScreen AS _UNSIGNED LONG
|
||||||
|
|
||||||
CheckResize = 0
|
CheckResize = 0
|
||||||
|
|
||||||
' *** Check to see if the user resized the window. If so, change the SCREEN image to the correct size.
|
|
||||||
IF _RESIZE THEN
|
IF _RESIZE THEN
|
||||||
|
|
||||||
' *** First, create a copy of the current SCREEN image.
|
|
||||||
TempScreen = _COPYIMAGE(CurrentScreen, 32)
|
TempScreen = _COPYIMAGE(CurrentScreen, 32)
|
||||||
|
|
||||||
' *** Set the SCREEN to the copied image, releasing the current SCREEN image.
|
|
||||||
SCREEN TempScreen
|
SCREEN TempScreen
|
||||||
|
|
||||||
' *** Remove (FREE) the original SCREEN image.
|
|
||||||
_FREEIMAGE CurrentScreen
|
_FREEIMAGE CurrentScreen
|
||||||
|
|
||||||
' *** Create a new "original" SCREEN image.
|
|
||||||
CurrentScreen = _NEWIMAGE(_RESIZEWIDTH, _RESIZEHEIGHT, 32)
|
CurrentScreen = _NEWIMAGE(_RESIZEWIDTH, _RESIZEHEIGHT, 32)
|
||||||
|
|
||||||
' *** Set the SCREEN to the new "original" image, releasing the copied SCREEN image.
|
|
||||||
SCREEN CurrentScreen
|
SCREEN CurrentScreen
|
||||||
|
|
||||||
' DRAW PREVIOUS SCREEN ON THE NEW ONE
|
|
||||||
_PUTIMAGE (0, 0), TempScreen, CurrentScreen
|
_PUTIMAGE (0, 0), TempScreen, CurrentScreen
|
||||||
|
|
||||||
_DISPLAY
|
_DISPLAY
|
||||||
|
|
||||||
' *** Remove (FREE) the copied SCREEN image.
|
|
||||||
_FREEIMAGE TempScreen
|
_FREEIMAGE TempScreen
|
||||||
|
|
||||||
' *** Tell the caller there was a resize
|
|
||||||
CheckResize = -1
|
CheckResize = -1
|
||||||
|
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
END FUNCTION
|
END FUNCTION
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue