How do I make an Addon change the behavior of another one?
I want to make an addon that makes Details use a different font so I don't have to replace the font file every time the addon is updated
I know that Skinner was written to change how other addons look, so I know its kinda possible to do it However, the only time I see specific fonts being mentioned is in these lines: Lua Code:
I just wanted an addon that added the following line: SharedMedia:Register ("font", "Proza Regular", [[Interface\Addons\NewAddon\fonts\headlines.TTF]]) So I wouldn't have to manually make changes to the fonts every time Details is updated Another problem I'm having is that the line I pasted just above isn't working. Proza Regular doesn't show up in the font list, and my usual solution is replacing one of the font files by it. Shitty, I know. |
Download the SharedMedia addon and read the "INSTRUCTIONS for MyMedia" file inside.
https://www.wowace.com/projects/sharedmedia |
Your line isn't working because your addon won't know what "SharedMedia" is unless you declare it. If you had lua errors enabled, it would give you an error telling you that you "attempted to use SharedMedia (a nil value)" or something like that (displaying lua errors may be disabled by default with no option given to enable them in the UI, thanks Blizzard.)
lua Code:
This should work as long as your addon is loaded after another addon which has LibStub and LibSharedMedia included, but if you want to be clever you could do it like this (as per SharedMedia_NoAsianFonts): lua Code:
This is more robust and should work regardless of the order in which addons are loaded. Or at least it works for me -shrugs- |
All times are GMT -6. The time now is 07:34 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI