Greetings, in my previous posts I been mentioning that I am trying to make a window, but maybe I am not explaining it right. What I am doing is making a bitmap that a user can click on any portion of it and it will move where you drag the mouse. But when you drag the mouse it just stutters the image and will not move it correctly. Here is the code I am using to move the bitmap around:
Create3d_Object:
`Define the dimensions of the image
create3dwidth = 300
create3dheight = 13
` Allow the user to move the window around
`(create3dwindowx and create3dwindowy are global variables to track window position)
if mouseclick() = 1
if mousex() > create3dwindowx and mousex() < create3dwindowx+create3dwidth
if mousey() > create3dwindowy and mousey() < create3dwindowy+create3dheight
`Detect the target mouse position that we want to move the window to
create3dwindowxtarget = mousex()
create3dwindowytarget = mousey()
`Determine the direction and move the window accordingly
if create3dwindowx < create3dwindowxtarget then create3dwindowx = create3dwindowx + 5
if create3dwindowx > create3dwindowxtarget then create3dwindowx = create3dwindowx - 5
if create3dwindowy < create3dwindowytarget then create3dwindowy = create3dwindowy + 5
if create3dwindowy > create3dwindowytarget then create3dwindowy = create3dwindowy - 5
endif
endif
endif
`Draw the image to the screen
paste image 1,create3dwindowx,create3dwindowy
return
Any suggestions in being able to move the bitmap around is appreciated.