• 0

    posted a message on Dynamic Frames
    Quote from schiwik
    To make a template, you have to set virtual="true" on the frame in your xml file.


    yes, I understand that, in my original post I didn't really post a question, the question was, do I have this correct?
    Posted in: Lua Code Discussion
  • 0

    posted a message on Dynamic Frames
    I had a question very similar to this. Let's say I wanted to create an addon that would create 4 different frames. The 4 frames would be identical in all aspects except for size and the text displayed in the frame.

    What you are saying is I could create one version of this in my .xml file and name it something like "myTemplate". And in this template I could have something like this:

    <Layers>
       <Layer level="OVERLAY">
          <FontString name="$parent_Text" inherits="GameFontNormal">
             <Anchors>
                <Anchor point="CENTER">
                   <Offset>
                   <AbsDimension x="0" y="0" />
                   </Offset>
                </Anchor>
             </Anchors>
          </FontString>
       </Layer>
    </Layers>
    Then in my .lua file I could use the CreateFrame method to create 4 different versions of this one frame and then change the text contents of each frame using the name assigned to it during creation, like this:

    local f = CreateFrame('Frame', 'frame1', 'UIParent', 'myTemplate')
    f_Text:SetText("Test")


    Is this correct?
    Posted in: Lua Code Discussion
  • 0

    posted a message on Bartender4 - Official Topic
    Quote from bob825
    with the bagbar you use to be able to click the main bag and it would open all bags (and key rings) using the /openallbags API call

    I don't see that implemented, is this possible or am I SOL?


    just wanted to clarify this question

    in Bartender3 I was able to alter the code so when the BagBar main backpack button was clicked it would open all bags including the key ring, it required editing the BarClass.lua:

    MainMenuBarBackpackButton:SetScript("OnClick", function() OpenAllBags() end)
    in Bartender4 I can't seem to find how to repeat this functionality, I've searched all of the files that came with Bartender4 and have found only a few references to the "OnClick" event and none of them specifically refer to the BagBar.

    How would it be possible to reproduce this behavior in Bartender4?

    The only thought I have is the action of the BagBag now is associated with a key binding and I have to associate it with the binding that opens all bags. Am I correct in my assumption?

    Any questions/comments would be appreciated. - and yes, I'm posting it again as it didn't even any valid responses (the previous response to this question had nothing to do with my original question)
    Posted in: General AddOns
  • 0

    posted a message on Bartender4 - Official Topic
    Quote from bob825
    with the bagbar you use to be able to click the main bag and it would open all bags (and key rings) using the /openallbags API call

    I don't see that implemented, is this possible or am I SOL?


    just wanted to clarify this question

    in Bartender3 I was able to alter the code so when the BagBar main backpack button was clicked it would open all bags including the key ring, it required editing the BarClass.lua:

    MainMenuBarBackpackButton:SetScript("OnClick", function() OpenAllBags() end)
    in Bartender4 I can't seem to find how to repeat this functionality, I've searched all of the files that came with Bartender4 and have found only a few references to the "OnClick" event and none of them specifically refer to the BagBar.

    How would it be possible to reproduce this behavior in Bartender4?

    The only thought I have is the action of the BagBag now is associated with a key binding and I have to associate it with the binding that opens all bags. Am I correct in my assumption? I'm not at my home computer to test this out.

    Any questions/comments would be appreciated.
    Posted in: General AddOns
  • 0

    posted a message on Bartender4 - Official Topic
    with the bagbar you use to be able to click the main bag and it would open all bags (and key rings) using the /openallbags API call

    I don't see that implemented, is this possible or am I SOL?
    Posted in: General AddOns
  • To post a comment, please or register a new account.