Thread Tools Display Modes
04-12-10, 08:00 PM   #1
Toran
A Nerdscale Dorkin
 
Toran's Avatar
Premium Member
Join Date: May 2006
Posts: 143
Cork - remove border and backdrop

Hi all. I'm trying to remove the border and backdrop from Cork. I can do it no problem with the anchor tooltip, but can't for the info tooltip. Any tips on what to do?

Assuming I need to modify something in this code, which shows the tooltip containing the needed buffs/etc.

Code:
-----------------------
--      Tooltip      --
-----------------------

tooltip = CreateFrame("GameTooltip", "Corkboard", UIParent, "GameTooltipTemplate")
tooltip:SetFrameStrata("MEDIUM")
CorkboardTextLeft1:SetFontObject(GameTooltipTextSmall)
CorkboardTextRight1:SetFontObject(GameTooltipTextSmall)


local function GetTipAnchor(frame)
	local x,y = frame:GetCenter()
	if not x or not y then return "TOPLEFT", frame, "BOTTOMLEFT" end
	local hhalf = (x > UIParent:GetWidth()*2/3) and "RIGHT" or (x < UIParent:GetWidth()/3) and "LEFT" or ""
	local vhalf = (y > UIParent:GetHeight()/2) and "TOP" or "BOTTOM"
	return vhalf..hhalf, frame, (vhalf == "TOP" and "BOTTOM" or "TOP")..hhalf
end


local raidunits = {player = true}
for i=1,4 do raidunits["party"..i] = true end
for i=1,40 do raidunits["raid"..i] = true end
function Cork.Update(event, name, attr, value, dataobj)
	if Cork.keyblist[attr] then return end

	tooltip:ClearLines()
	tooltip:SetOwner(anchor, "ANCHOR_NONE")
	tooltip:SetPoint(GetTipAnchor(anchor))
	

	if Cork.db.showbg or (GetZoneText() ~= "Wintergrasp" and select(2, IsInInstance()) ~= "pvp") then
		local count = 0
		for name,dataobj in pairs(Cork.corks) do
			local inneed, numr = 0, GetNumRaidMembers()
			for i=1,numr do if dataobj.RaidLine and dataobj["raid"..i] then inneed = inneed + 1 end end
			if dataobj.RaidLine and numr > 0 and dataobj["player"] then inneed = inneed + 1 end
			if inneed > 0 and count < Cork.dbpc.tooltiplimit then
				if Cork.db.showunit then tooltip:AddDoubleLine(string.format(dataobj.RaidLine, inneed), "raid") else tooltip:AddLine(string.format(dataobj.RaidLine, inneed)) end
				count = count + 1
			end
			for i,v in ldb:pairs(dataobj) do
				if not Cork.keyblist[i] and (inneed == 0 or not raidunits[i]) and count < Cork.dbpc.tooltiplimit then
					if Cork.db.showunit then tooltip:AddDoubleLine(v, i) else tooltip:AddLine(v) end
					count = count + 1
				end
			end
		end
	end

	if tooltip:NumLines() > 0 and not onTaxi then tooltip:Show() end
end
  Reply With Quote
04-13-10, 04:17 PM   #2
Toran
A Nerdscale Dorkin
 
Toran's Avatar
Premium Member
Join Date: May 2006
Posts: 143
Bump ... Any suggestions?
  Reply With Quote
04-13-10, 04:24 PM   #3
harrellj
A Flamescale Wyrmkin
Join Date: Jul 2009
Posts: 132
That code snippet has nothing in there referencing a border or backdrop that I can tell. Instead, it looks like it might be using the default game tooltip information, meaning it should be modifiable with Tiptac or something similar.
  Reply With Quote
04-13-10, 05:54 PM   #4
Toran
A Nerdscale Dorkin
 
Toran's Avatar
Premium Member
Join Date: May 2006
Posts: 143
Originally Posted by harrellj View Post
That code snippet has nothing in there referencing a border or backdrop that I can tell. Instead, it looks like it might be using the default game tooltip information, meaning it should be modifiable with Tiptac or something similar.
That's the odd thing - I use tiptac and it doesn't modify it. Same default border and background.
  Reply With Quote
04-13-10, 05:56 PM   #5
Slakah
A Molten Giant
 
Slakah's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 863
add
Code:
tooltip:SetBackdrop(nil)
after
Code:
tooltip = CreateFrame("GameTooltip", "Corkboard", UIParent, "GameTooltipTemplate")
Or you could replace
Code:
tooltip = CreateFrame("GameTooltip", "Corkboard", UIParent, "GameTooltipTemplate")
with
Code:
tooltip = CreateFrame("GameTooltip", "Corkboard", UIParent)
this one might not work though.
  Reply With Quote
04-13-10, 08:49 PM   #6
Toran
A Nerdscale Dorkin
 
Toran's Avatar
Premium Member
Join Date: May 2006
Posts: 143
thanks very much - worked.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Cork - remove border and backdrop


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off