• 0

    posted a message on Hiding frames
    Yes of course, sorry about the confusion. Here is the code:
    MyFrame = CreateFrame("Frame", "MainFrame", UIParent)
    MyFrame:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
    MyFrame:SetBackdrop( {
          bgFile = [[Interface\Tooltips\UI-Tooltip-Background]],
          edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]],
          tile = true, tileSize = 16, edgeSize = 16,
          insets = { left = 5, right = 5, top = 5, bottom = 5 }
    MyFrame:SetBackdropColor(0.75, 0.75, 0.75)
    MyFrame:SetBackdropBorderColor(1, 1, 1, 1)
    StatusBar = CreateFrame("StatusBar", nil, MyFrame, "TextStatusBar")
    StatusBar:SetPoint("TOP", MyFrame, "BOTTOM")

    It's very simple, it creates 2 frames: MyFrame which will have a fontstring on it saying something like "Energy regen bar" and then the StatusBar which is gonna work as my energy bar.
    What I want is to hide only MyFrame, but since apparently StatusBar is a child of MyFrame (?) it will also hide that bar. ???
    Posted in: Lua Code Discussion
  • 0

    posted a message on Hiding frames
    Hi all, I have a problem with my addon. I have created 2 frames, 1 "main frame", (MyFrame) which functions as an anchor for my other frame (StatusBar) which is attached to the "main frame".

    Ok here's the problem, when I run MyFrame:Hide() it also hides the StatusBar frame? If I do StatusBar:Hide() then only the statusbar frame will be hidden but not the other way around. What should I do? Create a hidden frame that's always on the screen but hidden and attach all other frames to it? Help please!
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.