Loading...
Forum Rules:
You may only create a new thread here if you have created a guide on how to do something with Tukui. Do not create a thread here if you just want to ask how to do something.

Updated External Tukui Edit Guide

1
Maxivmus of MaxUI started to do a guide awhile ago but it hasn't been updated in awhile.

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
This is how to use xml files for loading your files

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>
We have a new way to hook into Tukui functions, you'll have to change things based on what you're wanting to edit but I'll be giving an example on editing panels in Tukui

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
https://t.me/pump_upp