View Single Post
04-26-14, 09:56 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Code:
CharacterFramePortrait:Hide()
CharacterFramePortrait.Show = function() end
However, if you just remove the portrait, you'll still have the circular portrait frame, because that's built into the frame's background texture. To get rid of that, you'd need to make a modified version of the default texture that didn't include the circle sticking out of the corner, or just change the frame's background entirely (eg. give it a tooltip-like background).

Code:
local noop = function() end

local function HideTextures(frame)
	if not frame then return end
	for i = 1, select("#", frame:GetRegions()) do
		local region = select(i, frame:GetRegions())
		if region:IsObjectType("Texture") then
			region:SetTexture("")
			region.SetTexture = noop
		end
	end
end

CharacterFramePortrait:Hide()
CharacterFramePortrait.Show = noop

HideTextures(CharacterFrame)
HideTextures(CharacterFrame.Inset)
HideTextures(CharacterModelFrame)

CharacterFrame:SetBackdrop(GameTooltip:GetBackdrop())
CharacterFrame:SetBackdropColor(0, 0, 0)
CharacterFrame:SetBackdropBorderColor(0.8, 0.8, 0.8)
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote