<OnEvent>
local threatpct = UnitDetailedThreatSituation("player", "target")
if threatpct and threatpct > 0 then
self:Show()
else
self:Hide()
if event == "PLAYER_REGEN_ENABLED" then
self:Hide()
elseif event == "PLAYER_REGEN_DISABLED" then
self:Show()
end
end
</OnEvent>
Ok, so far it works but when I'm tanking a mob and pull another one the panels isn't showing on mob2, first if i change the target and get back on mob2...
well, this code is my first try to make a kgpanel script, if someone have a idea to make this scritp more functional, please... teach me :)
ah, i need another script too :)
Need a script to show me the PvP Icons (alliance,horde,ffa) if my target has an eg. pvp status, any idea? EDIT: ok, i have done this... ;)
I had give up on this after several days of failures, thanks to you, I can do it now :) !
Like you I would be pleased to see others scripts, as wowwiki isn't very clear either precise (for a novice). I have the purpose to write a french tutorial so I need to learn about a lot of examples.
So, to kill two birds with one stone (Or "zwei Fliegen mit einer Klappe schlagen" :D), I did a script for On/Off bouton:
On (=>B_My_Buffoff)
OnLoad
[HTML]self:Hide()[/HTML]
OnClick
[HTML]self:Hide()
local B_My_Buffon = kgPanels:FetchFrame("B_My_Buffoff")
B_My_Buffon:Show()
local B_My_Buffon = SBFFrame6
B_My_Buffon:Show()[/HTML]
Off (=>B_My_Buffoff)
On Click
[HTML]self:Hide()
local B_My_Buffoff = kgPanels:FetchFrame("B_My_Buffon")
B_My_Buffoff:Show()
local B_My_Buffoff = SBFFrame6
B_My_Buffoff:Hide()
self:Hide()[/HTML]
The On/Off fonction works but, as usual, something is wrong: In combat and in group, the buff's frame is always reappearing. So if someone knows how I can fix that....
I've set up a panel to show / hide a Bartender Bar on click. Works perfectly. The issue I'm having is that the Bartender Bar shows on login / reloadui and I have to click on the panel to make it hide.
Is there any way to hide that bar when I log in?
I'd really appreciate if someone could help me, cause for the sake of me I can't figure it out :(
Hey there, I was just wondering if anyone knew how to remove a border on one side of a panel. ie. I want to remove the right border on one of my panels and cannot find an option for it.
Hi, i'm looking for some help as i know little about scripting :(
I'm wanting to have a panel that only shows when i'm casting. And also, i'm wondering if its possible to have a panel show for each bar on ForteXorcist DoT tracker, when the bar appears.
Hello, I currently have my borders class colored using
local _, class = UnitClass("player");
if class == "WARRIOR" then
self:SetBackdropBorderColor(0.95, 0.23, 0.23, 0.50)
elseif class == "PRIEST" then
self:SetBackdropBorderColor(1, 0.96, 0.98, 0.50)
elseif class == "MAGE" then
self:SetBackdropBorderColor(0.00, 1, 1, 0.50)
elseif class == "DRUID" then
self:SetBackdropBorderColor(1, 0.49, 0.04, 0.50)
elseif class == "PALADIN" then
self:SetBackdropBorderColor(0.92, 0.22, 0.46, 0.50)
elseif class == "HUNTER" then
self:SetBackdropBorderColor(0.33, 0.86, 0.00, 0.50)
elseif class == "ROGUE" then
self:SetBackdropBorderColor(1, 0.94, 0.16, 0.50)
elseif class == "SHAMAN" then
self:SetBackdropBorderColor(0.13, 0.42, 1, 0.50)
elseif class == "WARLOCK" then
self:SetBackdropBorderColor(0.36, 0.18, 1, 0.50)
elseif class == "DEATHKNIGHT" then
self:SetBackdropBorderColor(0.77, 0.12, 0.23, 0.50)
end
I would like them to change colors if that unit has aggro to red. (player, tar, tot, and Party 1-4)
First off, thanks for the add on, great work.
Second, is there any way to allow text rotating?
Basicly I just want my text on the hide/show recount bar to be vertical instead of horizontal. Have I missed something? And if not, could the option be easily implemented?
And there allways seems to be a few frames who's details don't get saved when switching profile/openning a profile on a new charcter. Any way to fix this?
I'm scrambling my brain trying to figure out how to code this but I find it hard to follow.
Can anyone give me a sample of how to get an image/texture to show up at a certain percent of my own health?
For instance, at 50% health and below the image/panel appears... is that possible to do?
I have a script that shows an image at 100% and fades to nothing at 0% health but can't reverse it or change for specific health level.
Could someone tell me how to bind a panel (or three) to Grid so when I join a party, 10-man raid, or 25-man raid, a panel that is the exact size as those parties on Grid shows up behind them?
I know I need to bind it to Grin onEvent, I think, but I don't know how.
Brilliant! So do I copy + paste verbatim? Additionally, do I have one single panel that resizes itself per party size, or do I need to make three independent panels?
Lastly, do I need to put values in the get raid/party members thing?
Any Panel created with KGPanels and colored by just KGPanels, doesn't show. creating a gradient panel is just coming up empty. Panels i had used for background pre-patch are invisible post patch.
Ive remade them, changed alpha settings. They all show up invisible.
Is it possible to display a libdatabroker plugin in a panel if so how do i go about it i think ive seen something todo with this i just cant think where.
Ive made a few panels to replace the micro menu using the below code is it possible to get the panels to show tooltips?
if pressed then
ToggleCharacter("PaperDollFrame")
end
Oh no....what's happened!!?!?! Just updated KGPanels via Curse and all my panels have been replaced by a large white block covering about 1 third of the bottom of the screen!!
I'm no expert with KGPanels and originally got it as part of a UI package most of which I have now replaced. I did at some time modify the artwork for my panels, but it's so long I can't remember how I got it all to work.
KGPanels does seem to be ignoring the artwork loaded into the library, and also seems to have lost all my border graphics and scripts.
Please any advice what to do to get my panels back would be extremely greatly appreciated.
Is it possible for kgpanels to store the state of a frame(hidden,or visible in this case) and which frames etc and save these as variables to be loaded on the next load?
My Prob is that KGP does not save Profiles for each Profil is created.I have createt Profil1 with some Panels. Then i created Profil two and copied the settings from Profil 1. So far...so good..now when ich change one Panel in this Profil2, the same Panels has changed then in Profil 1. I´ve uninstalled KGP and installed new.But its always the same. Can somebody help me?
it saves panel layouts globally.
Each profile, only specifies which layout to load. so if your copying the same layout your are editing the same layout. The flexability is you can create all your layouts on 1 toon, then on another toon only switch the layout in use for that toon.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Nobody knows? Maybe just a clue?
I have to try make a threat panel... it works, but not correctly
here is the code
<OnLoad>
self:RegisterEvent("PLAYER_REGEN_ENABLED")
self:RegisterEvent("PLAYER_REGEN_DISABLED")
self:RegisterEvent("PLAYER_TARGET_CHANGED")
self:Hide()
</OnLoad>
<OnEvent>
local threatpct = UnitDetailedThreatSituation("player", "target")
if threatpct and threatpct > 0 then
self:Show()
else
self:Hide()
if event == "PLAYER_REGEN_ENABLED" then
self:Hide()
elseif event == "PLAYER_REGEN_DISABLED" then
self:Show()
end
end
</OnEvent>
Ok, so far it works but when I'm tanking a mob and pull another one the panels isn't showing on mob2, first if i change the target and get back on mob2...
well, this code is my first try to make a kgpanel script, if someone have a idea to make this scritp more functional, please... teach me :)
ah, i need another script too :)
Need a script to show me the PvP Icons (alliance,horde,ffa) if my target has an eg. pvp status, any idea? EDIT: ok, i have done this... ;)
greetings
drago
I had give up on this after several days of failures, thanks to you, I can do it now :) !
Like you I would be pleased to see others scripts, as wowwiki isn't very clear either precise (for a novice). I have the purpose to write a french tutorial so I need to learn about a lot of examples.
So, to kill two birds with one stone (Or "zwei Fliegen mit einer Klappe schlagen" :D), I did a script for On/Off bouton:
[HTML]self:Hide()[/HTML]
OnClick
[HTML]self:Hide()
local B_My_Buffon = kgPanels:FetchFrame("B_My_Buffoff")
B_My_Buffon:Show()
local B_My_Buffon = SBFFrame6
B_My_Buffon:Show()[/HTML]
[HTML]self:Hide()
local B_My_Buffoff = kgPanels:FetchFrame("B_My_Buffon")
B_My_Buffoff:Show()
local B_My_Buffoff = SBFFrame6
B_My_Buffoff:Hide()
self:Hide()[/HTML]
The On/Off fonction works but, as usual, something is wrong: In combat and in group, the buff's frame is always reappearing. So if someone knows how I can fix that....
I've set up a panel to show / hide a Bartender Bar on click. Works perfectly. The issue I'm having is that the Bartender Bar shows on login / reloadui and I have to click on the panel to make it hide.
Is there any way to hide that bar when I log in?
I'd really appreciate if someone could help me, cause for the sake of me I can't figure it out :(
@Mavarice: you can't do this without using a custom texture as a background instead of a border.
I'm wanting to have a panel that only shows when i'm casting. And also, i'm wondering if its possible to have a panel show for each bar on ForteXorcist DoT tracker, when the bar appears.
Thanks in advance for any help you can give :)
I would like them to change colors if that unit has aggro to red. (player, tar, tot, and Party 1-4)
First off, thanks for the add on, great work.
Second, is there any way to allow text rotating?
Basicly I just want my text on the hide/show recount bar to be vertical instead of horizontal. Have I missed something? And if not, could the option be easily implemented?
And there allways seems to be a few frames who's details don't get saved when switching profile/openning a profile on a new charcter. Any way to fix this?
I'm scrambling my brain trying to figure out how to code this but I find it hard to follow.
Can anyone give me a sample of how to get an image/texture to show up at a certain percent of my own health?
For instance, at 50% health and below the image/panel appears... is that possible to do?
I have a script that shows an image at 100% and fades to nothing at 0% health but can't reverse it or change for specific health level.
I know I need to bind it to Grin onEvent, I think, but I don't know how.
Lastly, do I need to put values in the get raid/party members thing?
Any Panel created with KGPanels and colored by just KGPanels, doesn't show. creating a gradient panel is just coming up empty. Panels i had used for background pre-patch are invisible post patch.
Ive remade them, changed alpha settings. They all show up invisible.
Is it possible to display a libdatabroker plugin in a panel if so how do i go about it i think ive seen something todo with this i just cant think where.
Ive made a few panels to replace the micro menu using the below code is it possible to get the panels to show tooltips?
if pressed then
ToggleCharacter("PaperDollFrame")
end
I'm no expert with KGPanels and originally got it as part of a UI package most of which I have now replaced. I did at some time modify the artwork for my panels, but it's so long I can't remember how I got it all to work.
KGPanels does seem to be ignoring the artwork loaded into the library, and also seems to have lost all my border graphics and scripts.
Please any advice what to do to get my panels back would be extremely greatly appreciated.
Thanks
Each profile, only specifies which layout to load. so if your copying the same layout your are editing the same layout. The flexability is you can create all your layouts on 1 toon, then on another toon only switch the layout in use for that toon.