1. I'm trying create a button to use my hearthstone. The top section of code creates a frame and displays some artwork on the screen. the second chunk is supposed to create another frame and a button to go with it. I can get it to show up on the screen, but it takes up the ENTIRE screen. A while back I got some help on this forum and coded it in KgPanels, but now I'm trying to do it in my own addon. I tried to transfer over most of the code that i thought was relevant. The button works no matter where i click on it. If you can not only show me what i'm doing wrong but give me a brief explanation about why what I did was wrong that would really help me out in the future. Also I can't get the code to print as it is supposed to line by line without putting and extra line in between. Some direction on properly posting code would be great as well. Thanks!

    CreateFrame("Frame", "NibsMain", UIParent)

    NibsMain:SetWidth(1920)

    NibsMain:SetHeight(232)

    NibsMain:SetPoint("BOTTOM", UIParent, "CENTER")

    NibsMain:SetFrameStrata("LOW")

    NibsMain:SetFrameLevel(2)

    NibsMain.Border = NibsMain:CreateTexture("NibsMain.Border", "BACKGROUND")

    NibsMain.Border:SetWidth(1920)

    NibsMain.Border:SetHeight(256)

    NibsMain.Border:SetPoint("BOTTOM", NibsMain, "BOTTOM")

    NibsMain.Border:SetAlpha(1)

    NibsMain.Border:SetTexture("Interface\\AddOns\\NibsUI\\Borders\\MainFull")

    Hearth = CreateFrame("Button", "Hearth", UIParent, "SecureActionButtonTemplate")

    Hearth:SetWidth(30)

    Hearth:SetHeight(30)

    Hearth:SetPoint("CENTER", UIParent, "CENTER")

    Hearth:SetFrameStrata("HIGH")

    Hearth:SetFrameLevel(1)

    Hearth:SetNormalTexture("Interface\\AddOns\\NibsUI\\Buttons\\Hearth")

    Hearth:SetAllPoints()

    Hearth:SetAttribute("type", "item")

    Hearth:SetAttribute("item", "Hearthstone")

    Hearth:RegisterForClicks("AnyUp")

  2. The issue is Hearth:SetAllPoints(), which sets Hearth to be the same size as the parent frame. That's obviously not what you want, since you anchor it explicitly a few lines earlier.

  3. Ahh you're right. Thanks.