1. #1
    The Patient Jake5467's Avatar
    10+ Year Old Account
    Join Date
    Apr 2011
    Location
    Sydney, Australia
    Posts
    276

    Kg Panels - Panels that hide during combat?

    Hey was wondering if it's possible to make certain panels on Kg panels fade out, or disappear when in combat? I have 2 action bars that I have fade out to 0% alpha with bartender during combat and it looks kinda messy out of combat with them having no panel backdrop like the others. Would really appreciate any help!

    Thanks.


    EDIT:

    Here's my UI out of combat (see the 2 action bars on the sides of the middle bottom one):




    Here's my ui in combat (see them disappear):



    [Just a side note, if anyone has any ideas on how I could improve my UI let me know ]
    Last edited by Jake5467; 2012-04-16 at 04:07 PM.

  2. #2
    Deleted
    OnLoad:
    Code:
    self:RegisterEvent("PLAYER_REGEN_ENABLED")
    self:RegisterEvent("PLAYER_REGEN_DISABLED")
    OnEvent:
    Code:
    if event == "PLAYER_REGEN_DISABLED" then
        self:SetAlpha(0)
    else
        self:SetAlpha(1)
    end
    I assume the variable that exposes event name is called 'event' in kgPanels. I'm not sure about that part.

  3. #3
    The Patient Jake5467's Avatar
    10+ Year Old Account
    Join Date
    Apr 2011
    Location
    Sydney, Australia
    Posts
    276
    Where exactly do I put this code? In the script part of the panel options?

  4. #4
    Deleted
    Yeah, exactly.

  5. #5
    The Patient Jake5467's Avatar
    10+ Year Old Account
    Join Date
    Apr 2011
    Location
    Sydney, Australia
    Posts
    276
    Thanks Tree, just one more thing, is there a way I can intergrate this macro into an onclick script for kgpanels?

    Code:
    /equipset [spec:1] Fire; Spine
    /powa
    /usetalents [spec:1] 2; 1

  6. #6
    Deleted
    OnClick:
    Code:
    if pressed then
        SlashCmdList["POWA"]("")
        if GetActiveTalentGroup() == 1 then
            SetActiveTalentGroup(2)
            UseEquipmentSet("Fire")
        else
            SetActiveTalentGroup(1)
            UseEquipmentSet("Spine")
        end
    end

    Note: Neither of the two functions used above is listed as protected - if the OnClick script produces an ADDON_ACTION_FORBIDDEN error, that would mean that they are mis-documented. (I'm surprised that neither of them is protected, actually.)

Posting Permissions

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