sterlingy Active Member Licensed User Longtime User Mar 30, 2013 #1 Is it possible to change the depth of a sprite? I have new objects being created and I want them behind other objects that are already initialized and on the screen. I want the old objects on top. -Sterling
Is it possible to change the depth of a sprite? I have new objects being created and I want them behind other objects that are already initialized and on the screen. I want the old objects on top. -Sterling
Erel B4X founder Staff member Licensed User Longtime User Mar 30, 2013 #2 Yes. GameView.BitmapsData is a List. You can find the index of the BitmapData object, remove it and add it as the last item. Upvote 0
Yes. GameView.BitmapsData is a List. You can find the index of the BitmapData object, remove it and add it as the last item.
sterlingy Active Member Licensed User Longtime User Mar 30, 2013 #3 Erel said: Yes. GameView.BitmapsData is a List. You can find the index of the BitmapData object, remove it and add it as the last item. Click to expand... I looked at the contents of the GameView.BitmapData. It's a series of Rects and Bitmaps. I have no idea on how to find a specific object. Furthermore, wouldn't removing an object and adding it to the end of the list essentially put that object's depth at the top most level? I'm trying to put the object behind everything else Cheers, Sterling Upvote 0
Erel said: Yes. GameView.BitmapsData is a List. You can find the index of the BitmapData object, remove it and add it as the last item. Click to expand... I looked at the contents of the GameView.BitmapData. It's a series of Rects and Bitmaps. I have no idea on how to find a specific object. Furthermore, wouldn't removing an object and adding it to the end of the list essentially put that object's depth at the top most level? I'm trying to put the object behind everything else Cheers, Sterling
sterlingy Active Member Licensed User Longtime User Mar 30, 2013 #4 I found a solution. Since I know the index of the dynamic objects in the LIST, instead of adding new object to the end, I just InsertAt the beginning of the dynamic object in the LIST. BINGO! -Sterling Upvote 0
I found a solution. Since I know the index of the dynamic objects in the LIST, instead of adding new object to the end, I just InsertAt the beginning of the dynamic object in the LIST. BINGO! -Sterling