PDA

View Full Version : Bitmap widget layering issue



mattekure
January 13th, 2023, 12:18
Tested in 5E campaign.

I have an extension that adds a BitmapWidget to a token on a map. I also have the standard ruleset option to show effects for Player/GM set to Mark, so there will be a single mark indicating the effects. Typically, when you mouse over the mark, it pops up a tooltip showing all the effects on the token.

The widget is added as follows


statusWidget = tokenCT.addBitmapWidget(tBitmapNames[sBitmapName]);
statusWidget.setBitmap(tBitmapNames[sBitmapName]);
statusWidget.setName(tIndicatorTypes[sIndicatorType]);
statusWidget.setSize(wSize, hSize);
statusWidget.setVisible(true);
-- statusWidget.sendToBack();
statusWidget.setEnabled(false);


The issue I am seeing involes the sendToBack() function call which I have commented out in the sample. When I do not call sendToBack, the widget I draw appears on top of the effects Mark as expected, and I can still mouse over the mark and get the effects list.
https://i.imgur.com/Rz2A5DY.png

But ideally I want my widget to appear behind the effects Mark so it is still visible. When I uncomment and call the sendToBack() function, my widget does appear behind, but now I can no longer mouse over and get the effects tooltip.
It doesnt pop up as if my widget were interfering with it.
https://i.imgur.com/69hmlNB.png

Moon Wizard
January 13th, 2023, 15:50
Thanks for reporting. I'll take a look.

JPG