Thread Tools Display Modes
09-18-11, 07:01 AM   #1
Miiru
A Flamescale Wyrmkin
 
Miiru's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 138
Edgefile Insets?

I'm trying to add a border to my Chatframe, using this snippet of code:

Code:
local chatborder = CreateFrame("Frame",nil,UIParent) 

function chatborder:onEvent() 
	local border=CreateFrame("Frame",nil,UIParent)
  border:SetAllPoints(ChatFrame1)
  border:SetParent(ChatFrame1)
	border:SetBackdrop({
	edgeFile = "Interface\\Tooltips\\bagnon", --insert your file path texture or rename texture   
	edgeSize = 16,
	tile = true, tileSize = 16})
	border:SetFrameStrata("BACKGROUND")		
	
	local Chatframe = ChatFrame1
          if ChatFrame1 then border:SetParent(ChatFrame1) else border:Hide() end  
end
		 
function chatborder:new() 
self:SetScript("OnEvent", self.onEvent) 
self:RegisterEvent("PLAYER_LOGIN")	
end 
	 
chatborder:new()
Everything works great so far, but the border insets are looking weird and overlapping the chattext, so i would like to move the out of the middle a bit by maybe 4 or 5 pixels. Is it even possible to have something like edgefile insets?
  Reply With Quote
09-18-11, 07:48 AM   #2
nin
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 213
Try, change 0 too prefered inset.

Code:
insets = {
left = 0,
right = 0,
top = 0,
bottom = 0
}
})
-_-V
  Reply With Quote
09-18-11, 12:50 PM   #3
Miiru
A Flamescale Wyrmkin
 
Miiru's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 138
I was under the impression that those insets only work for the background texture?
  Reply With Quote
09-18-11, 02:56 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Instead of using :SetAllPoints() use 2 :SetPoint() calls with your desired offsets.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Edgefile Insets?


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