when creating an external edit the first thing you'll need is a .toc, it's pretty straight forward
Code: Select all
## Interface: 11302 -- if you play retail you want 80205 or it will be marked out of date
## Title: |cff18AA18PatUI|r -- this is how your AddOn name will appear in the AddOns menu
## Notes: PatUI Edit for Tukui Classic -- this will appear when you hover over your AddOn in the AddOns menu
## Version: 0.6
## Author: Pat
## RequiredDeps: Tukui -- Since we're editing Tukui we want to make sure Tukui is loaded first so our edit can properly edit Tukui
PatUI.xml -- you don't have to use xml but this is how I do it for loading my different files for edit rather then putting it all in the .toc
Code: Select all
<Ui xmlns="http://www.blizzard.com/wow/ui/">
<!-- Media -->
<Script file="media\media.lua"/>
<!-- Core -->
<Script file="core\functions.lua"/>
<!-- Config -->
<Script file="config\config.lua"/>
<Script file="config\locales.lua"/>
<!-- Modules -->
<Include file="modules\load_modules.xml"/> -- Include is how you load other xml files
</Ui>
Code: Select all
-- we unpack the Tukui Engine first so we can use it in our edit
local T, C, L = Tukui:unpack()
-- lets create a local to hold Tukz' Panels module
local Panels = T["Panels"]
-- we want to declare the function we want to edit locally
local baseEnable = Panels.Enable
function Panels:Enable()
-- First call the base function
baseEnable(self)
-- after that comes our edit stuff
local LC = Panels.LeftChatBG
-- we first need to use ClearAllPoints to remove all anchor points on the Left Chat Background so we can reanchor it where we want it
LC:ClearAllPoints()
-- we're setting the bottom left anchor point of the Left Chat Background to the bottom left anchor point of UIParent and moving it inward and upward by 4.
-- we don't need to be this specific with the anchor points all the time.
LC:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT, 4, 4)
end