<OnLoad> element makes my little window invisible
So I have the following XML file. If I remove the line in red, the window appears alright---but it does not respond to mouse drag. If I keep this line, the window is invisible, but I can drag it---I know it because the close button can still be seen. What is causing this problem and how do I fix it?
Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/" Code:
/run BCHFrame:RegisterForDrag("LeftButton") |
If you have an OnLoad you can set the backdrop there:
Lua Code:
|
Quote:
|
To directly answer the question, BackdropTemplate uses its own OnLoad handler to set the backdrop. When you supply your own, the default behavior is to overwrite it and the original no longer runs. You can call self:OnBackdropLoaded() manually to run it in your own handler since the template still writes its function there. Alternatively, you can use the inherit property to run your handler before or after the template's by setting it to "prepend" or "append" respectively.
https://wowpedia.fandom.com/wiki/XML/Scripts |
All times are GMT -6. The time now is 07:08 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI