Changing textures and backgrounds in .lua
Hi all
forgive me if this is a dumb question but I'm new to lua and and completely stuck! :confused: I understand that nUI textures can be changed in skins using: Code:
nUI_TopBars1:SetTexture("Interface\\AddOns\\nUI_TESTSKIN\\nUI_TESTSKIN_01" ); Theres two things stopping me here, first is I simply don't know what the .lua would be! Could it be something like: Code:
nUI_UNITFRAME_SOLOPLAYER: bgFile ("Interface\\AddOns\\nUI_TESTSKIN\\nUI_TESTSKINbg.blp" ) ; (every file in nUI\Layouts\Default\UnitPanels) Is it possible to add lines in the .lua of a skin to also change all these borders and backgrounds together, or would each file need manually changing? :eek: Thanks a lot TC :banana: |
What you would want to do is catch the "ADDON_LOADED" event and test of "nUI" then you would assign new values to the background elements in the respective layout files from within your addon. This would allow you to modify which textures are used at runtime without having to edit the nUI sources.
Have a look at the nUI_AuraButtons mod for a peek at how the layout files can be changed at runtime. |
All times are GMT -6. The time now is 09:15 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI