Quantcast WoWInterface - View Single Post - TitanPanel new ver and nUI dont .....
View Single Post
12-15-10, 06:19 PM   #27
Premium Member
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,123
Hmm this is getting annoying ..

I hate to host the file somewhere else for people to download and its so temporary for it to be silly to set it up as a permanent addon on this site.

So perhaps a manual fix step by step file by file will work out better. Its about the best I can think of. I am not sure how Mac users will be able to utilise this or whether it will need to be translated into Mac speak

Please also note that this has been designed to only work with nUI version 5. I will assume that nUI 6 will ultimately get the changes incorporated as standard and this is just a fill gap method for users of titan like myself so that they can continue to use both addons in the interim.

1. Locate your addons folder in your WoW game folder ( do a search for nUI.lua to find the nUI addon files to help you here ) and back up until Interface/AddOns is the current folder with, amongst others, a folder called nUI.

2. Create a new folder in the Interface/AddOns folder and call it nUI_Plugin_TitanPanel ( use exact spelling here ). Then open up that folder.

3. Copy the file following into that folder and continue onto the next stage. Or open up notepad or some other text editor and paste the following text block into it and save it as nUI_Plugin_TitanPanel.lua.

-- Name : nUI_Plugin_TitanPanel                                          
-- Copyright : Tina Kirby AKA Xrystal (C) 2009/2010 All Rights Reserved      
-- Contact : [email protected]                                           
-- Download Sites :                                                          
-- Version : 1.01.00 - New

--[[ Use Addon Wide Data Table ]]--
local addonName,addonData = ...

addonData["Events"] = CreateFrame("Frame","PTP_Frame",UIParent);

local function PTP_DetectTitanBars()
	local TopBar1ID = Titan_Bar__Display_Bar
	local TopBar1HideID = Titan_Bar__Hider_Bar
	local TopBar2ID = Titan_Bar__Display_Bar2
	local TopBar2HideID = Titan_Bar__Hider_Bar2
	local TopBar1Show = TitanPanelGetVar("Bar_Show")
	local TopBar1Hide = TitanPanelGetVar("Bar_Hide")
	local TopBar2Show = TitanPanelGetVar("Bar2_Show")
	local TopBar2Hide = TitanPanelGetVar("Bar2_Hide")

	local BottomBar1ID = Titan_Bar__Display_AuxBar
	local BottomBar1HideID = Titan_Bar__Hider_AuxBar
	local BottomBar2ID = Titan_Bar__Display_AuxBar2
	local BottomBar2HideID = Titan_Bar__Hider_AuxBar2
	local BottomBar1Show = TitanPanelGetVar("AuxBar_Show")
	local BottomBar1Hide = TitanPanelGetVar("AuxBar_Hide")
	local BottomBar2Show = TitanPanelGetVar("AuxBar2_Show")
	local BottomBar2Hide = TitanPanelGetVar("AuxBar2_Hide")
	local BothTopBars = TopBar1Show and TopBar2Show
	local BothTopBarsHidden = TopBar1Hide and TopBar2Hide
	local BothBottomBars  = BottomBar1Show and BottomBar2Show
	local BothBottomBarsHidden = BottomBar1Hide and BottomBar2Hide
	if BothTopBars then
		if not TopBar2Hide then
			nUI_TopBarsLocator:SetPoint( "BOTTOMLEFT", TopBar2ID, "BOTTOMLEFT", 0, 0 );	
			nUI_TopBarsLocator:SetPoint( "BOTTOMLEFT", TopBar2HideID, "BOTTOMLEFT", 0, 0 );	
	elseif TopBar1Show then
		if not TopBar1Hide then
			nUI_TopBarsLocator:SetPoint( "BOTTOMLEFT", TopBar1ID, "BOTTOMLEFT", 0, 0 );
			nUI_TopBarsLocator:SetPoint( "BOTTOMLEFT", TopBar1HideID, "BOTTOMLEFT", 0, 0 );
		nUI_TopBarsLocator:SetPoint( "BOTTOM", UIParent, "TOP", 0, 0 );
	if BothBottomBars then
		if not BottomBar2Hide then
			nUI_BottomBarsLocator:SetPoint( "TOPLEFT", BottomBar2ID, "TOPLEFT", 0, 0 );
			nUI_BottomBarsLocator:SetPoint( "TOPLEFT", BottomBar2HideID, "TOPLEFT", 0, 0 );
	elseif BottomBar1Show then
		if not BottomBar1Hide then
			nUI_BottomBarsLocator:SetPoint( "TOPLEFT", BottomBar1ID, "TOPLEFT", 0, 0 );
			nUI_BottomBarsLocator:SetPoint( "TOPLEFT", BottomBar1HideID, "TOPLEFT", 0, 0 );
		nUI_BottomBarsLocator:SetPoint( "TOP", UIParent, "BOTTOM", 0, 0 );

local function PTP_OnTitanPanelEvent(self)
	if IsAddOnLoaded( "Titan" ) then
		hooksecurefunc( "Titan_AutoHide_ToggleAutoHide", PTP_DetectTitanBars );
		hooksecurefunc( "Titan_AutoHide_ShowHide", PTP_DetectTitanBars );
		hooksecurefunc( "TitanPanelBarButton_DisplayBarsWanted",PTP_DetectTitanBars );
		LibStub("AceAddon-3.0"):GetAddon("TitanMovable"):Unhook("updateContainerFrameAnchors", Titan_ContainerFrames_Relocate );
		Titan_ContainerFrames_Relocate = function() end;
		self:UnregisterEvent( "PLAYER_ENTERING_WORLD" );


local function PTP_Events(self,event,...)
	local arg1,arg2,arg3,arg4,arg5,arg6 = ...;
	if ( event == "ADDON_LOADED" and arg1 == addonName ) then
		if nUI_TitanPanelEvents then 
	elseif ( event == "PLAYER_ENTERING_WORLD" ) then		

--[[ Register the events we want to watch ]]--
addonData["Events"]:SetScript( "OnEvent", PTP_Events );
addonData["Events"]:RegisterEvent( "ADDON_LOADED" );
addonData["Events"]:RegisterEvent( "PLAYER_ENTERING_WORLD" );
4. Open up notepad or some other text editor you may have and paste the following text block into it and save it as nUI_Plugin_TitanPanel.toc.

## Interface: 40000
## Title: nUI: Plugin [|cffeda55fTitanPanel|r]
## Author: Tina Kirby AKA Xrystal (C) 2009/2010 All Rights Reserved
## Notes: Temporary Plugin to make nUI 5 work with Titan Panel
## Version: 1.01.00
## eMail: [email protected]
## RequiredDeps: nUI, Titan
## DefaultState: Enabled
## LoadOnDemand: 0
## SavedVariables : 
## SavedVariablesPerCharacter:  

Attached Files
File Type: lua nUI_Plugin_TitanPanel.lua (4.0 KB, 649 views)

Last edited by Xrystal : 12-15-10 at 06:29 PM.