1. #1

    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 ~
    Overwatch mod
    Twitter | Soundcloud

  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
    High Overlord be3f's Avatar
    10+ Year Old Account
    Join Date
    Aug 2011
    Location
    Copenhagen
    Posts
    100
    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.
    - be3f

Posting Permissions

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