Thanks for responding.
1) OK, GetPointerX() is actually captured at the start of my Do loop, and I meant to pass it to any function that needed it. I didn't pass it to this function - I will correct that. This project I am working real hard to use no globals and to not duplicate work. I missed it here. Thanks for pointing that out. Totally missed it. I changed it, but I still get the ghost effect.
2) I thought I was capping x# by this code:
if x# > 70 then x# = 70
if x# < 3 then x# = 3
It still allows the mouse to go wherever but caps the x# movement. That is my intent, anyways. Wait.....
Ok.... I think I see what you mean... I will work on this tomorrow, and get back with you.
I hate to include this, because at this point I am getting a sense of spaghetti code lol - I am trying to not have globals(thank Fubar) and use "state" modes; so far I have zero globals. I think I can pull it off, but damn I am getting lost...
do
Camerapos.x = GetCameraX(1)
Camerapos.y = GetCameraY(1)
Camerapos.z = GetCameraZ(1)
mouse2dX# = GetPointerX()
mouse2DY# = GetPointerY()
if GamePlayMode = 0
if PreviewAsset.info.PropertyToUpdate < 1
//Ribbon Menus
MainMenuMouseOverCheck = CheckForMouseOverMainMenu( FileMenuObject, mouse2dX#, mouse2dY# )
MainMenuMouseClickMode = CheckForMainMenuMouseClick( HideMainMenuSprIndex, MainMenuMouseClickMode, FileMenuObject, mouse2dX#, mouse2dY# )
HideMainMenuSprIndex = MainMenuMaintenence( HideMainMenuSprIndex, MainMenuMouseOverCheck, MainMenuMouseClickMode, FileMenuObject, mouse2dX#, mouse2dY# )
//IndicatorSpr in Asset Folder GUI
AssetFolderClickCheckIndex = SelectAssetFolderCheck(MediaFolderNames,AssetFolderClickCheckIndex)
// Expand Folders
AssetFolderExpandButtonCheckIndex = CheckForExpandFolderSprHit( AssetFolderExpandButtonCheckIndex,MediaFolderNames )
MediaFolderNames = CreateNewFoldersForAssetExpand( MediaFolderNames,AssetFolderExpandButtonCheckIndex,PlusGUIimg,SubtractGUIimg,indicatorImg,FolderSprIMG )
// CompresFolders
AssetFolderCompressButtonCheckIndex = CheckForCompressFolderSprHit( AssetFolderCompressButtonCheckIndex,MediaFolderNames )
//removes folder content/sprites when folder is collapsed
if AssetFolderCompressButtonCheckIndex > -1
MediaFolderNames = RemoveFolderandSprites(MediaFolderNames,AssetFolderCompressButtonCheckIndex)
FolderContentSprites = RemoveOldFolderContent(FolderContentSprites)
ScrollBarandButton[0] = RemoveScrollBarSprites(ScrollBarandButton[0])
endif
//get Folderarray dimensions for scrolling
AssetFolderDimensions = GetArrayDimensions( MediaFolderNames,oldFolderarraylength,AssetFolderDimensions )
// update scroll bar size for folders area
GUIboxsprites = ResizeAssetScrollBarsFolderBox( MediaFolderNames, AssetFolderExpandButtonCheckIndex, AssetFolderCompressButtonCheckIndex, GUIboxsprites, MediaFolderNames.length,AssetFolderDimensions )
//update expand mode
MediaFolderNames = CheckandUpdateExpandMode( MediaFolderNames,AssetFolderExpandButtonCheckIndex )
// Shrink Folder Preview Box
ShowResizeIcon( assetshrinkarrowmode,GUIboxsprites[48].SprID )
assetshrinkarrowmode = TestEdgeofAssetBoxMouseOver(GUIboxsprites[2].SprID,assetshrinkarrowmode)
//Resize Asset Box
if assetshrinkarrowmode = 1
GUIboxsprites = GUIBoxResize( assetshrinkarrowmode,GUIboxsprites,FolderContentSprites )
ScrollBarandButton[0] = ScrollBarCreateTestFolderAssets(ScrollBarandButton[0],FolderContentSprites,AssetFolderClickCheckIndex,oldAssetFolderClickCheckIndex,GUIboxsprites[51].SprID,GUIboxsprites[2].SprID,assetshrinkarrowmode)
endif
// Scroll up and down Folder Box
FolderBoxScrollMode = TestForSpriteDetection( GUIboxsprites[50].SprID, FolderBoxScrollMode,assetshrinkarrowmode )
MoveFolderIconsWithMouse(MediaFolderNames,FolderBoxScrollMode, GUIboxsprites[50].SprID,GUIboxsprites[51].SprID,oldmousey#,mouse2DY#,AssetFolderDimensions)
//Show Folder Content
if AssetFolderClickCheckIndex > -1 and AssetFolderClickCheckIndex <> oldAssetFolderClickCheckIndex
FolderContentSprites = RemoveOldFolderContent(FolderContentSprites)
ScrollBarandButton[0] = RemoveScrollBarSprites(ScrollBarandButton[0])
endif
FolderPreviewIndicatorIndex = SelectFileInPreviewFolder(FolderContentSprites,FolderPreviewIndicatorIndex )
FolderContentSprites = AssetFolderContentCreator( MediaFolderNames,GUIboxsprites,FolderContentSprites,AssetFolderClickCheckIndex,oldAssetFolderClickCheckIndex,FolderContentSpriteImages,ImagesFromFoldersArray,CombinedImagesForAssetDisplay )
FolderContentSprites = PlaceAssetIndicatorSpr(FolderContentSprites,FolderPreviewIndicatorIndex,oldFolderPreviewIndicatorIndex,indicatorImg)
//Scroll up and down Folder Box
ScrollBarandButton[0] = ScrollBarCreateTestFolderAssets(ScrollBarandButton[0],FolderContentSprites,AssetFolderClickCheckIndex,oldAssetFolderClickCheckIndex,GUIboxsprites[51].SprID,GUIboxsprites[2].SprID,assetshrinkarrowmode)
AssetBoxScrollMode = TestForSpriteDetection( ScrollBarandButton[0].ButtonSprId, AssetBoxScrollMode,-1 )
if AssetBoxScrollMode = 1
MoveSprWithScrollBar(oldmousey#,mouse2DY#,mouse2DX#,ScrollBarandButton[0],GetSpriteY(GUIboxsprites[2].SprID),GetSpriteY(GUIboxsprites[51].SprID),AssetBoxScrollMode )
endif
//show PreviewAsset
PreviewAsset = ShowAssetPreviewinGUIBox(FolderPreviewIndicatorIndex,oldFolderPreviewIndicatorIndex,PreviewAsset,FolderContentSprites,GUIboxsprites[52].SprID,Camerapos,GUIboxsprites[5].SprID,GUIboxsprites,ObjectTexturesKeys,TerrainTextureKeys,ShaderKeys)
// GUI ObjectBox
ShowObjectBox(PreviewAsset,GUIboxsprites) //GUIboxsprites[5].SprID to 21
PreviewAsset = TestForObjectUpdates(PreviewAsset,GUIboxsprites,mouse2dX#,mouse2dY#)
endif
//sets up game states
PreviewAsset = TestForObjectImageUpdate(PreviewAsset,GUIboxsprites,mouse2dX#,mouse2dY#,CombinedImagesForAssetDisplay,PopUpBoxSprites)
//choose selection and assign meta key
PreviewAsset = SelectPopUpImage_Object(PreviewAsset,PopUpIndicatorSpr,mouse2DX#,mouse2DY#,PopUpBoxSprites)
if PreviewAsset.LoadPopUpImages = 1
PopUpBoxSprites = OpenImagePopUpBoxForObject(PreviewAsset.info.PropertyToUpdate,GUIboxsprites,CombinedImagesForAssetDisplay,PopUpBoxSprites,indicatorImg2,PopUpIndicatorSpr)
//PopUpIndicatorSpr
PreviewAsset.LoadPopUpImages = 0
elseif PreviewAsset.LoadPopUpImages = -1
PopUpBoxSprites = HideImagePopUpBoxForObject(GUIboxsprites,PopUpBoxSprites,PopUpIndicatorSpr)
PreviewAsset.LoadPopUpImages = 0
PreviewAsset.info.PropertyToUpdate = 0
elseif PreviewAsset.LoadPopUpImages > 1
//setobject to image selected through the imagekey
PreviewAsset = SetKeytoObject(PreviewAsset,PopUpIndicatorSpr,PopUpBoxSprites,ObjectTexturesKeys)
PopUpBoxSprites = HideImagePopUpBoxForObject(GUIboxsprites,PopUpBoxSprites,PopUpIndicatorSpr)
PreviewAsset.LoadPopUpImages = 0
PreviewAsset.info.PropertyToUpdate = 0
endif
endif
//resusable variables
oldFolderarraylength = MediaFolderNames.length
oldAssetFolderClickCheckIndex = AssetFolderClickCheckIndex
oldFolderPreviewIndicatorIndex = FolderPreviewIndicatorIndex
AssetFolderCompressButtonCheckIndex = -1
AssetFolderExpandButtonCheckIndex = -1
oldmousey# = mouse2DY#
oldmousex# = mouse2dX#
oldCamerapos.x = Camerapos.x
oldCamerapos.y = Camerapos.y
oldCamerapos.z = Camerapos.z
mouseCoords = get_mouse_coords_No_Y(mouseCoords,mouse2DX#,mouse2DY#)
//print( mouseCoords.x )
//print( mouseCoords.z )
print(PopUpIndicatorSpr.SelectedSpr1)
print( GetImageMemoryUsage() )
//Print( ScreenFPS()
Sync()
loop