1. #1

    Border around my chat frame.

    I'm trying to add a border around my chat frame with the UI-tooltip-border that i have for my tooltips.

    Here is the code im using:
    Code:
    for i = 1, NUM_CHAT_WINDOWS do
    	local cf = _G['ChatFrame'..i]
    	if cf then
    		size = -20,
    		cf:SetBackdrop({
    			edgeFile = 'Interface\\AddOns\\BasicUI\\BasicMedia\\UI-Tooltip-Border',
    			tile = false, tileSize = 16, edgeSize = 18,
    			insets = {left = size, right = size, top = 2, bottom = size},
    		})
    	end
    end

    And here is what it looks like in-game:



    Thanks in advance for any help with this.

    Coke

  2. #2
    Deleted
    Well, what are you trying to do?

  3. #3
    I would like to get the border tobe outside the shadow part of the chat. if you look close you can see it in the image.

  4. #4
    Deleted
    Well, simply reduce/increase the insets until the border fits the shadow.

  5. #5
    its not working.. this is why came here and asked for help.

    New pic (to see the chat shadow not the background shadow)


    Current code is:
    Code:
    for i = 1, NUM_CHAT_WINDOWS do
    	local cf = _G['ChatFrame'..i]
    	if cf then
    		cf:SetBackdrop({
    			edgeFile = 'Interface\\AddOns\\BasicUI\\BasicMedia\\UI-Tooltip-Border',
    			edgeSize = 18,
    			insets = {left = 50, right = 50, top = 20, bottom = 150},
    		})
    	end
    end

  6. #6
    Deleted
    Ah, I see. Didn't know insets didn't work on borders.

  7. #7
    Thank you very much it works nicely.

    ---------- Post added 2011-09-28 at 03:43 PM ----------

    Ok I'm having a issue. As everyone knows the combat log has a "extra" area above it so with this code it dont look right.

    there are 2 things i have tried I will post code and images of all 2.

    First Attempt

    Code:
    for i = 1, NUM_CHAT_WINDOWS do
    	local cf = _G['ChatFrame'..i]
    	if cf then
    		local bg = CreateFrame("Frame", nil, cf);
    		bg:SetFrameStrata("BACKGROUND");
    		bg:SetPoint("TOPLEFT", -8, 8);
    		bg:SetPoint("BOTTOMRIGHT", 8, -8);
    		bg:SetBackdrop({
    			edgeFile = 'Interface\\AddOns\\BasicUI\\BasicMedia\\UI-Tooltip-Border',
    			edgeSize = 18,
    		})
    	end
    end
    	
    local ct = _G['ChatFrame2']
    if ct then
    	local bg = CreateFrame("Frame", nil, ct);
    	bg:SetFrameStrata("BACKGROUND");
    	bg:SetPoint("TOPLEFT", -8, 32);
    	bg:SetPoint("BOTTOMRIGHT", 8, -8);
    	bg:SetBackdrop({
    		edgeFile = 'Interface\\AddOns\\BasicUI\\BasicMedia\\UI-Tooltip-Border',
    		edgeSize = 18,
    	})
    end
    General Window with a Good Border:


    Combat Log Window With a Double Border:




    Second attempt:

    Code:
    for i = 3, NUM_CHAT_WINDOWS do
    	local cf1 = _G['ChatFrame1']
    	local cf2 = _G['ChatFrame2']
    	local cf3 = _G['ChatFrame'..i]
    	local bg1 = CreateFrame("Frame", nil, cf1);
    	local bg2 = CreateFrame("Frame", nil, cf2);
    	local bg3 = CreateFrame("Frame", nil, cf3);
    	
    	if cf1 then
    		bg1:SetFrameStrata("BACKGROUND");
    		bg1:SetPoint("TOPLEFT", -8, 8);
    		bg1:SetPoint("BOTTOMRIGHT", 8, -8);
    		bg1:SetBackdrop({
    			edgeFile = 'Interface\\AddOns\\BasicUI\\BasicMedia\\UI-Tooltip-Border',
    			edgeSize = 18,
    		})
    	end	
    	
    	if cf2 then
    		bg2:SetFrameStrata("BACKGROUND");
    		bg2:SetPoint("TOPLEFT", -8, 32);
    		bg2:SetPoint("BOTTOMRIGHT", 8, -8);
    		bg2:SetBackdrop({
    			edgeFile = 'Interface\\AddOns\\BasicUI\\BasicMedia\\UI-Tooltip-Border',
    			edgeSize = 18,
    		})
    	end
    	
    	if cf3 then
    		bg3:SetFrameStrata("BACKGROUND");
    		bg3:SetPoint("TOPLEFT", -8, 8);
    		bg3:SetPoint("BOTTOMRIGHT", 8, -8);
    		bg3:SetBackdrop({
    			edgeFile = 'Interface\\AddOns\\BasicUI\\BasicMedia\\UI-Tooltip-Border',
    			edgeSize = 18,
    		})
    	end		
    end
    General Chat Window with thick border:



    Combat Log Window with thick single border:


    Whisper window with good border:


    So as you can see the code works and gets around the chat frames but how can i set this up so:

    A) i dont see all the borders at the same time overlaping (i know this is how come I have the thick borders with the second code)
    B) i get rid of the double border in the combat log window.

    Thanks for any help on this you all here at MMO Forums are some of the best helpers around.

    Coke
    Last edited by Cokedriver; 2011-09-28 at 03:43 PM.

  8. #8
    Thanks for the help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •