Edit text of existing in-game frame
Hey all. I'm sort of a wow add-on noob so apologies if this is a trivial question.
I recently began creating my first add-on which calculates the probability of a skill-up when crafting certain trade-skill items, based on the following formula from the wiki. I've managed to implement it almost fully now, by gathering up all the percentage chances for the players crafts, as seen here: https://imgur.com/a/At9rOOy Now all I want to do is display these percentages beside each craftable item in the players TradeSkill frame, rather than just printing it out in chat like I have been doing thus far. To help understand, I made a quick image edit of what I mean: This https://imgur.com/a/M8rNCQi Rather than this: https://imgur.com/a/CLlTv8T Would anyone be able to give me some pointers on how to achieve this? I initially tried using the frame stack to access the child frames belonging to each consecutive item, but using functions like frame:SetText() and the like proved futile. Any help with this would be greatly appreciated. |
This in an addon that loads with the Blizzard_TradeSkillUI will add the recipe ID to the text.
You can use that (or whatever you need) to do your calculation and add that text instead. The Count ([nnn]) at the end of the text is a separate fontstring. There's only so much space so the recipe text can be truncated for long recipe titles. Lua Code:
|
All times are GMT -6. The time now is 09:55 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI