This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
I'm using the item type execute to show an preview image in the ThreatPlates options dialog. Whenever the profile is changed and, therefore, the path to the image changes (it's based on a configuration setting, db.targetWidget.theme, see below), the image is not updated. It still shows the image based on the value of the previous profile.
Here's the code:
Preview = { name = L["Preview"], order = 10, type = "execute", image = "Interface\\AddOns\\TidyPlates_ThreatPlates\\Widgets\\TargetArtWidget\\" .. db.targetWidget.theme, imageWidth = 128, imageHeight = 32,},
Is that something that's not supported and I have to write custom code to achieve an image update or is it a bug?
A workaround for me right now is to update the image attribute directly in the callback function for "OnProfileChanged".
If you do it this way, the image is only ever constructed once on load. You would have to wrap it into a function to get dynamic generation.
Maybe something like this:
image = function() return "Interface\\AddOns\\TidyPlates_ThreatPlates\\Widgets\\TargetArtWidget\\" .. db.targetWidget.theme end,
Ok, I'll try that. Thanks for the response.
To post a comment, please login or register a new account.