1. #1
    Moderator Alarinth's Avatar
    Join Date
    Mar 2012
    Location
    DefiasBrotherhood-EU, Norway
    Posts
    485

    KGpanels show / hide functions

    Hey there. I tried searching, but didn't find exactly the features I were looking for. Since I have no clue at all how to use coding / these functions, I wouldn't be able to figure it out on my own ^^.

    What I want, is to have a panel show / hide based on what spec I am in. This is because the panel is filled by an addon only working for one spec, and will be useless for other specs.

    Now, what would I enter to have a panel show if I am in destruction spec, and hide if I am not?
    ~ Battle.net MVP ~
    Warlock & Priest moderator
    <Amused to Death> - West #123, EU #90

  2. #2
    It would be useful to know which addon it is, maybe it can be fixed by simply parenting it to the addon frame

  3. #3
    Also in the same vein, is it possible to have a Kgpanel show/hide the micromenu onclick? I'm having trouble getting it to work with Bartender, and wasn't sure if it were a controlled function or not.

  4. #4
    Field Marshal be3f's Avatar
    Join Date
    Aug 2011
    Location
    Copenhagen
    Posts
    85
    I guess something like this could work:

    OnUpdate:
    Code:
    local id = GetSpecialization()
    
    if id == nil then
     self:SetAlpha(0)
    elseif id == 1 then
     self:SetAlpha(0)
    elseif id == 2 then
     self:SetAlpha(0)
    elseif id == 3 then
     self:SetAlpha(1)
    end
    Last edited by be3f; 2013-05-15 at 06:35 PM.
    - Nobody.. I mean nobody puts ketchup on a hotdog

Posting Permissions

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