View Single Post
09-10-17, 03:16 PM   #1
Ither
A Firelord
 
Ither's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 497
sixUI + Bagnon Guild

I'm merely asking this for my own personal needs; it appears Sixthly hasn't been on for at least month and doesn't appear to be answering many people.

I run his UI and one thing that bothers me is that the Bagnon Guild Frame is not skinned.

Addon: http://www.wowinterface.com/download...410-SixUI.html

I'm no expert at LUA, but some things I can fix--so far I was able to get the frame skinned, but I can't get the skinned frame to disappear. Upon digging through his addon; it appears he's hooking a frame to the titleframe of each Bagnon frame--further review found integration file that I believe is handling that. Looking through Bagnon's code; I see where they use a function to build a titleframe; which make sense so that you can view your different character inventory--however on Guild Bank frame they don't; it's a local function built into the frame.lua.

Here is the integration LUA; trying to figure out if there is a way to hook the frame build onto frame through this; or I must go another route. It would explain why Sixthly didn't put it in there--I mean, he framed EVERYTHING else except this one frame.

/SixUI/Modules/Integration/Bagnon.lua

Code:
-------------------------------------------------------------------------------
-- Namespace
-------------------------------------------------------------------------------

local SixUI  = LibStub("AceAddon-3.0"):GetAddon("SixUI")
local Module = SixUI:NewModule("Integration Bagnon", "AceEvent-3.0", "AceHook-3.0")

-------------------------------------------------------------------------------
-- Module
-------------------------------------------------------------------------------

function Module:OnEnable()
	if not IsAddOnLoaded("Bagnon") then
		self:RegisterEvent("ADDON_LOADED")
		return
	end

	if not self:IsHooked(Bagnon.TitleFrame, "New") then
		self:RawHook(Bagnon.TitleFrame, "New", "TitleFrame_New")
	end
end

-------------------------------------------------------------------------------
-- Events and Hooks
-------------------------------------------------------------------------------

function Module:ADDON_LOADED(event, name)
	if name == "Bagnon" then
		self:UnregisterEvent("ADDON_LOADED")
		self:OnEnable()
	end
end

function Module:TitleFrame_New(...)
	local titleFrame = self.hooks[Bagnon.TitleFrame].New(...)
	titleFrame:SetToplevel(False)
	return titleFrame
end
For those who are wondering;

Here is where he defined SixUI_Bank template (basically adds the beautycase borders.
Code:
	<Frame name="SixUI_Inventory" inherits="SixUI_Template">
		<Size x="0" y="0"/>
		<Anchors>
			<Anchor point="BOTTOMRIGHT" relativeTo="UIParent" relativePoint="BOTTOMRIGHT" x="-20" y="20"/>
		</Anchors>
	</Frame>
	<Frame name="SixUI_GuildInventory" inherits="SixUI_Template">
		<Size x="0" y="0"/>
		<Anchors>
			<Anchor point="BOTTOMRIGHT" relativeTo="UIParent" relativePoint="BOTTOMRIGHT" x="-20" y="400"/>
		</Anchors>
	</Frame>
And here is where you actually set the frame to modify.

Code:
local FRAMES_TO_MODIFY = {
	["BagnonFramebank"] = {point = "CENTER", relativeTo = "SixUI_Bank", relativePoint = "CENTER", setWidthHook = true, setHeightHook = true},
	["BagnonFrameinventory"] = {point = "CENTER", relativeTo = "SixUI_Inventory", relativePoint = "CENTER", setWidthHook = true, setHeightHook = true},
	["BagnonFrameguild"] = {point = "CENTER", relativeTo = "SixUI_GuildInventory", relativePoint = "CENTER", setWidthHook = true, setHeightHook = true},
Like I said; I can get the it to frame the GuildBank and show up when I click on it--but when I close it the frame background stays on my screen. When I look at it in framestack; it's not really attached to Bagnon Guild Frame--or what I believe, it's not catching the close hook to hide that frame.
__________________
  Reply With Quote