Hide when in pet battle? #5


  • New
  • Enhancment
Open
Assigned to _ForgeUser405586
  • transitbus created this issue Oct 19, 2015

    What is the enhancement in mind? How should it look and feel?

    I love your addons. Ok now that the praise is over... Any way to add in hiding this during a pet battle?

    Not even worth putting a ticket in over as it is so small it doesn't really matter but I am really really anal retentive about my UI :/

    Please provide any additional information below.

    Just add in to hide the frame while in a pet battle and I think that would be super.

  • transitbus added the tags New Enhancment Oct 19, 2015
  • transitbus posted a comment Oct 19, 2015

    Adding

    RegisterStateDriver(frame, "visibility", "[petbattle] hide; show")
    

    to local function OnUpdate(frame,elap)

    at line 79

    does the trick


    Edited Oct 19, 2015
  • transitbus posted a comment Oct 19, 2015

    Ok this is dirty and makes me unhappy but it works

    local function OnEvent(event,...)
      if InCombatLockdown() then return end
      if GetNumGroupMembers() > 0 and 
         (not UnitInRaid("player") or 
          (UnitIsGroupLeader("player") or UnitIsGroupAssistant("player"))) then
    	RegisterStateDriver(addon.border, "visibility", "[petbattle] hide; show")
        addon.border:Show()
      else
    	RegisterStateDriver(addon.border, "visibility", "[petbattle] hide")
        addon.border:Hide()
      end
    end
    

    Edited Oct 21, 2015

To post a comment, please login or register a new account.