• 0

    posted a message on kgPanels Offical Thread
    I want to make a panel that displays bar-spell slots. Slots are reserved for items from my inventory: bg's bombs for example. But I want this panel appears only when I have these items in my inventory.

    For example, I want my panel shows the RP-GG (Rocket-Propelled in Wintergrasp), what happens if I do:


    [HTML]DominosActionButton36: ClearAllPoints ()
    DominosActionButton36: SetPoint ("TopLeft" kgPanels: FetchFrame ("Explo_Dom8"), "TopLeft", 6, -19)
    DominosActionButton36: SetAlpha (0)[/HTML]


    The panel then retrieves the slot I want. But now I want the argument executes only if I have the item in my inventory, otherwise, my panel disappears.

    Any Ideas? :confused:
    Posted in: General AddOns
  • 0

    posted a message on kgPanels Offical Thread
    Thank you Drago!

    I had give up on this after several days of failures, thanks to you, I can do it now :) !

    Like you I would be pleased to see others scripts, as wowwiki isn't very clear either precise (for a novice). I have the purpose to write a french tutorial so I need to learn about a lot of examples.
    So, to kill two birds with one stone (Or "zwei Fliegen mit einer Klappe schlagen" :D), I did a script for On/Off bouton:

    • On (=>B_My_Buffoff)
    • OnLoad
      [HTML]self:Hide()[/HTML]

      OnClick
      [HTML]self:Hide()
      local B_My_Buffon = kgPanels:FetchFrame("B_My_Buffoff")
      B_My_Buffon:Show()
      local B_My_Buffon = SBFFrame6
      B_My_Buffon:Show()[/HTML]

    • Off (=>B_My_Buffoff)
    • On Click
      [HTML]self:Hide()
      local B_My_Buffoff = kgPanels:FetchFrame("B_My_Buffon")
      B_My_Buffoff:Show()
      local B_My_Buffoff = SBFFrame6
      B_My_Buffoff:Hide()
      self:Hide()[/HTML]

    The On/Off fonction works but, as usual, something is wrong: In combat and in group, the buff's frame is always reappearing. So if someone knows how I can fix that....
    Posted in: General AddOns
  • 0

    posted a message on kgPanels Offical Thread
    Quote from Ahnfamily
    Hello,

    I want to make a panel control for my target frame:

    Goal: To change position (x-y) of the target frame when "threatpct" return more than 100%.



    Nobody knows? Maybe just a clue?
    Posted in: General AddOns
  • 0

    posted a message on kgPanels Offical Thread
    Hello,

    I want to make a panel control for my target frame:

    Goal: To change position (x-y) of the target frame when "threatpct" return more than 100%. (ask me if it isn't clear, my english is quite rough)

    I see
    isTanking, status, threatpct, rawthreatpct, threatvalue = UnitDetailedThreatSituation("unit", "mob")
    hum.... i'm confused :s

    I tried to assign my panel to my target-frame as a parent, and I declared affiliation to SatrinaBuffFrame. (Is that what I'm supposed to write?)

    OnLoad:
    elf:RegisterUnitEvent("UNIT_THREAT_SITUATION_UPDATE", self, "UpdateThreat")
    elf:RegisterUpdateFunc(self,"UpdateThreat")


    Onevent
    if ( frame.highlight.hasThreat ) then
    SUFUnittarget:ClearAllPoints()
    SUFUnittarget:SetPoint("Right", UIParent, "Right", -287.34, 35.86)
    else
    SUFUnittarget:ClearAllPoints()
    SUFUnittarget:SetPoint("Top", UIParent, "Top", -3.62, -141.56)
    end


    OnUpdate: I can't figure it out...:confused:

    What's wrong with it?
    Posted in: General AddOns
  • To post a comment, please or register a new account.