kgPanels

Create panels for customizing your UI, sucessor to eePanels

Wiki and FAQ

Sample Scripts

OnClick now provides a pressed and released variable you can check for.

if pressed then
  -- do mouse down actions
elseif released then
  -- do mouse up actions
end

This means your script will get called twice when someone clicks the panel.

Here is a youtube link to a video Tutorial

Ive created an Example Texture Pack.

This example pack is just a template. If you want to use it as a storage spot for your art, look at the read me file for directions on usage.

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of madindehead madindehead Mar 06, 2010 at 00:43 UTC - 0 likes

    Hmm. All I saw was an option to import from eePanels2 sadly.

  • Avatar of kagaro kagaro Mar 06, 2010 at 00:12 UTC - 0 likes

    there is an import eepanels layout command in the config.

  • Avatar of madindehead madindehead Mar 05, 2010 at 12:38 UTC - 0 likes

    Hey mate,

    I have been using eePanels for a while since coming back to WoW, but I think maybe I should update to kgPanels now.

    Is there a simple way to try and import most of the settings from eePanels into kgPanels? Would it be best to go into the WTF/Config folder and copy over the value from the eePanels.lua file to the kgPanels.lua file?

    Thanks

  • Avatar of Narodigg Narodigg Mar 02, 2010 at 02:41 UTC - 0 likes

    I have tried an underscore and it did not help. Sorry I should have mentioned that.

    Here is the error. 1x <string>:"rightmenu-info_OnLoad":40: attempt to index global 'LegoFortressFishing_Broker' (a nil value)

    Last edited Mar 02, 2010 by Narodigg
  • Avatar of kagaro kagaro Mar 02, 2010 at 02:06 UTC - 0 likes

    try an _ char it might just not be shwn well thats its an underscore.

  • Avatar of Narodigg Narodigg Mar 01, 2010 at 19:34 UTC - 0 likes

    I have scripted my Fortress blocks in Kgpanels to show and hide with onclick events.

    However one specific Fortress piece is giving me an issue because it has a space in its name.

    As the Frame Finder displays it LegoFortressFishing Broker

    of course scripting this the space causes issues.

    Sample Onload script of panel.

    LegoFortressFishing Broker:Hide() LegoFortressFishing Broker:SetFrameStrata("HIGH")

    I have tried wrapping this to get the right syntax here.

        " "
        ' '
        ( )
        [ ]
    

    Also played the google game, with not luck. Anyone here able to help me get this wrapped correctly?

    Last edited Mar 01, 2010 by Narodigg
  • Avatar of VanillaXS VanillaXS Feb 26, 2010 at 20:52 UTC - 0 likes

    Hey guys, I´m having a problem with KG Panels which I recently noticed. (Only the action bar layer, chat and recount layer working correctly.)

    When I log on, my action bar layer looks like this: http://img682.imageshack.us/img682/4135/pic1rk.jpg

    When I /reload UI, and only when I /reload UI, it looks like this: http://img695.imageshack.us/img695/1949/pic2vo.jpg

    As you can see, the boarders are a bit thicker when I /reload UI.

    This is how its supposed to be AND how it was originally designed.

    (THE WIDTH/HEIGHT NUMBERS DO NOT CHANGE THO.)

    So then I thought, just make it a big thicker, and I added 1 width and 1 height each panel and then it looked like it should look.

    But when I /reload UI now OR even when I log off / on again, it looks like this: http://img19.imageshack.us/img19/4646/pic3ai.jpg

    (P.S: I can avoid /rl, the problem is, when I do not change the settings it looks smaller. (screen 1)

    When I change the widht and height to the settings I want to (screen 2), THEN THEY CHANGE THRU logging on or off and look bigger (screen 3). (so this time no /rl).)

    The same happens with skada, it just wont let me set a new position for it, after each relog / new log on it moved 1inch to the left.

    Last edited Feb 26, 2010 by VanillaXS
  • Avatar of XeguH XeguH Feb 20, 2010 at 15:25 UTC - 0 likes

    Hi, and thanks for nice work.

    Don't have much experience with scripting, but trying figure out how to change texture or background color based on DK presence change (Blood, Frost, Unholy).

    Please )

  • Avatar of Vexryn Vexryn Jan 12, 2010 at 23:05 UTC - 0 likes

    I've been experimenting with using kgPanels to toggle a ChatFrame when I enter/exit a city (and the associated Trade Channel), but can't seem to get it work. I've tried the scripts from the kgPanels page at: http://www.wowace.com/addons/kg-panels/pages/sample-scripts/#w_controlling-a-panel-based-on-entering-a-major-city

    But that doesn't seem to work (even when I correct the typo on "RegisterEvent" and add quotes around CHAT_MSG_CHANNEL_NOTICE

    Right now, here's what I'm using, and not certain why it won't work:

    OnLoad: self:RegisterEvent("CHAT_MSG_CHANNEL_NOTICE") { note this is different than the sample scripts page, which is self:RegsiterEvent('CHAT_MSG_CHANNEL_NOTICE') }

    OnEvent: if event == "CHAT_MSG_CHANNEL_NOTICE" then if arg1 == "YOU_JOINED" and arg7 == 2 then ChatFrame3:Show() end if arg1 == "YOU_LEFT" and arg7 == 2 then ChatFrame3:Hide() end end

    Note that I tagged it as ChatFrame3:Show() and Hide() respectively, because I actually want to toggle that frame, not the kgPanels frame itself.

    I've tried toggling the self:Show() and self:Hide() and anchoring/parenting it to ChatFrame3, and that doesn't seem to work either.

    Notably, I *can* make it work by making an OnClick event as follows: if pressed then if ChatFrame3:IsVisible() then ChatFrame3:Hide() else ChatFrame3:Show() end end

    I just cannot make it occur "automatically" based on CHAT_MSG_CHANNEL_NOTICE

    Any insight would be greatly appreciated!

  • Avatar of ImpalerCore ImpalerCore Nov 06, 2009 at 15:03 UTC - 0 likes

    Excellent! If those scripts work, then you should be able to do something based on whether you enter or exit a vehicle (arg1 == "player"), and ignore those events where someone else enters or exits a vehicle (arg1 == "partyN" or arg1 == "raidN" where N is a number representing a particular member of the party).

    Here is a slightly modified script to respond to those events by printing a simple chat message.

    <OnLoad>
    self:RegisterEvent("UNIT_ENTERED_VEHICLE");
    self:RegisterEvent("UNIT_ENTERING_VEHICLE");
    self:RegisterEvent("UNIT_EXITING_VEHICLE");
    self:RegisterEvent("UNIT_EXITED_VEHICLE");
    
    <OnEvent>
    DEFAULT_CHAT_FRAME:AddMessage(event)
    
    if (event == "UNIT_ENTERED_VEHICLE") then
        if ( arg1 == "player" ) then
            DEFAULT_CHAT_FRAME:AddMessage( UnitName("player") .. " is ready to rock-n-roll!" )
        else
            DEFAULT_CHAT_FRAME:AddMessage( "Does " .. UnitName( arg1 ) .. " know how to drive?" )
        end
    else if ( event == "UNIT_EXITED_VEHICLE" )
        if ( arg1 == "player" ) then
            DEFAULT_CHAT_FRAME:AddMessage( UnitName( arg1 ) .. " has left the vehicle." )
        else
            DEFAULT_CHAT_FRAME:AddMessage( UnitName( arg1 ) .. " didn't know how to drive." )
        end
    end
    

    http://lua-users.org/wiki/StringsTutorial is a good resource for manipulating strings in lua. I would recommend playing around with them. If you want to respond to a particular party member by name, class, level, etc, you can query their attributes by passing arg1 to those respective functions, UnitName, UnitClass, UnitLevel. You can use the SendChatMessage API to even communicate with other members based on these attributes.

    http://wowprogramming.com/docs/api/SendChatMessage

    <OnEvent>
    DEFAULT_CHAT_FRAME:AddMessage(event)
    
    if (event == "UNIT_ENTERED_VEHICLE") then
        if ( arg1 == "player" ) then
            SendChatMessage( UnitName( arg1 ) .. " is ready to rock 'n roll", "PARTY" )
        end
    end
    

    If this works, you should be able to replace the chat messages with sound effects if you wish. It should be something similar to the following.

    <OnLoad>
    self:RegisterEvent("UNIT_ENTERED_VEHICLE");
    self:RegisterEvent("UNIT_ENTERING_VEHICLE");
    self:RegisterEvent("UNIT_EXITING_VEHICLE");
    self:RegisterEvent("UNIT_EXITED_VEHICLE");
    
    <OnEvent>
    DEFAULT_CHAT_FRAME:AddMessage(event)
    
    if (event == "UNIT_ENTERED_VEHICLE") then
        if ( arg1 == "player" ) then
            PlaySoundFile("Sound\\Character\\Gnome\\GnomeMaleLaugh01.wav")
        end
    else if ( event == "UNIT_EXITED_VEHICLE" )
        if ( arg1 == "player" ) then
            PlaySoundFile("Sound\\Character\\Gnome\\GnomeMaleCry01.wav")
        end
    end
    

    You can find paths to the wow sounds here.

    http://www.wowwiki.com/API_PlaySoundFile http://www.wowwiki.com/Category:Macros\Sounds

    Give these scripts a try and see if they do what you expect. Then, if you can get these working, see if you can replace the appropriate lines with hiding and showing the frames you want.

Facts

Date created
Sep 16, 2008
Category
Last update
Oct 17, 2014
Development stage
Release
Language
  • enUS
  • frFR
  • koKR
  • zhCN
License
All Rights Reserved
Curse link
kgPanels
Reverse relationships
1
Downloads
1,795,120
Recent files
  • R: 1.19 for 6.0.2 Oct 17, 2014
  • A: r433 for 6.0.2 Oct 17, 2014
  • A: r432 for 6.0.2 Oct 17, 2014
  • R: 1.18 for 5.4.8 Oct 14, 2014
  • A: r430 for 5.4.8 Oct 14, 2014

Authors