nothing has changed in the profile code, so assuming you used seperate profiles for each charatcer it shoul dbe differnet, now if they are all using the same profile, then yes it would be the same for each character.
I have a priest with dual spec holy / shadow. I'm looking for a script to place a frame behind the BT4 stance bar for shadowform, but hide when I swap to holy. I've done a bit of digging, and drawn a blank.
This is the code I have to parent to the stance bar, but I'm struggling with the additional code to hide it on talent swap. Changing stance, then doing a /reloadui works, but I want / would like it to be automatic;)
if class == "PRIEST" then
local w = BT4BarStanceBarOverlay:GetWidth()
local h = BT4BarStanceBarOverlay:GetHeight()
if w >= 2 then
self:SetWidth(44)
self:SetHeight(44)
self:Show()
else
self:Hide()
end
This forms part of a larger overall "onload" script that covers me for all my toons (I have one of each class @80). New talents are not an issue, so don't worry about that.
nothing has changed in the profile code, so assuming you used seperate profiles for each charatcer it shoul dbe differnet, now if they are all using the same profile, then yes it would be the same for each character.
So, everythig works...you´ve been right with the layouts.
Big thank´s
@ Eldavido:
In the Profiles there can be chosen a 2nd Profil for the 2nd specc...isn´t it what you need?
Thanks mate, but sadly the dual profile thing didn't work. I still have the issue with this particular frame not updating on spec change :(
I'm still open to ideas :)
EDIT:
In OnLoad:
local spacing = 2
local borderW = 12
local borderH = 9
local offsetX = 0
local offsetY = 2
local w = 31
local h = 31
local scale = BT4BarStanceBar:GetScale()
local buttonCount = GetNumShapeshiftForms()
local totalButtonWidth = floor(buttonCount*w)
local totalBarHeight = floor(h+4)
if buttonCount >= 1 then
if buttonCount == 1 then
local totalButtonSpacing = floor(buttonCount)
local totalBarWidth = floor((totalButtonWidth+totalButtonSpacing)+borderW)
self:SetWidth(totalBarWidth)
else
local totalButtonSpacing = floor((buttonCount-1)*spacing)
local totalBarWidth = floor(totalButtonWidth+totalButtonSpacing+borderW)
self:SetWidth(totalBarWidth)
end
self:SetScale(scale)
self:SetHeight(floor(totalBarHeight+borderH))
self:ClearAllPoints()
self:SetPoint("CENTER", BT4BarStanceBarOverlay, "CENTER", offsetX, offsetY)
self:Show()
else
self:Hide()
end
In OnEvent:
local spacing = 2
local borderW = 12
local borderH = 9
local offsetX = 0
local offsetY = 2
local w = 31
local h = 31
local scale = BT4BarStanceBar:GetScale()
local buttonCount = GetNumShapeshiftForms()
local totalButtonWidth = floor(buttonCount*w)
local totalBarHeight = floor(h+4)
if buttonCount >= 1 then
if buttonCount == 1 then
local totalButtonSpacing = floor(buttonCount)
local totalBarWidth = floor((totalButtonWidth+totalButtonSpacing)+borderW)
self:SetWidth(totalBarWidth)
else
local totalButtonSpacing = floor((buttonCount-1)*spacing)
local totalBarWidth = floor(totalButtonWidth+totalButtonSpacing+borderW)
self:SetWidth(totalBarWidth)
end
self:SetScale(scale)
self:SetHeight(floor(totalBarHeight+borderH))
self:ClearAllPoints()
self:SetPoint("CENTER", BT4BarStanceBarOverlay, "CENTER", offsetX, offsetY)
self:Show()
else
self:Hide()
end
I Found this on another forum, though I modded it a bit. It works to a fashion, any idea on how to make it priest specific? i.e only show if class is priest, not for any other class??
I'd like to show/hide an addon that recycles frames (so they can only be accessed as variables), there is no normal frame name etc. Is it possible with kgpanels?
I'm having an issue with Profiles. I set different profiles for each og my characters. Logged each character and selected the correct profile. If i make one change to any one profile (i've set up gradients using class colors for each character) the changes affect the other profiles. Any ideas or help would be great. Thanks.
If you want different layouts for your characters, then you need to use different Layouts in kgPanels. You can then assign layouts to characters via the profiles.
I want to make a panel that displays bar-spell slots. Slots are reserved for items from my inventory: bg's bombs for example. But I want this panel appears only when I have these items in my inventory.
For example, I want my panel shows the RP-GG (Rocket-Propelled in Wintergrasp), what happens if I do:
The panel then retrieves the slot I want. But now I want the argument executes only if I have the item in my inventory, otherwise, my panel disappears.
Hi all. First of all apologies for asking for what is bound to be a simple script but it is a script I have not been able to find anywhere.
All I am looking to do is use a script on 2 different panels. One of these panels is to only be visible when solo, the other is to only be visible when in a group with 1 other or more. I dont need either to resize, or anything complex, just to show or hide when required.
No doubt this will be a simple script for those that can do it but I have looked and googled and have not found it. I have found scripts for a lot of other more complex uses but not for this.
I am currently making my way through this large and informative thread. Currently on page 40, I will keep reading but I am afraid it will either not be ther due to it being simple or I might have missed it due to my noobness with scripting.
So any advice or tips or scripts for these 2 panels would be very greatly appreciated!
P.S Been using kgp for a while and want to say thanks for a great addon. I have had no problems with this but have never been any good with scripting! thanks again :)
Is it possible to fade in and out a panel according to the chat text?
My idea is that somehow a panel as anchored to the text of a chat frame so that when there is no new text for a while both, the chat text AND the panel fade out. Is this possible?
Hi all. First of all apologies for asking for what is bound to be a simple script but it is a script I have not been able to find anywhere.
All I am looking to do is use a script on 2 different panels. One of these panels is to only be visible when solo, the other is to only be visible when in a group with 1 other or more. I dont need either to resize, or anything complex, just to show or hide when required.
No doubt this will be a simple script for those that can do it but I have looked and googled and have not found it. I have found scripts for a lot of other more complex uses but not for this.
I am currently making my way through this large and informative thread. Currently on page 40, I will keep reading but I am afraid it will either not be ther due to it being simple or I might have missed it due to my noobness with scripting.
So any advice or tips or scripts for these 2 panels would be very greatly appreciated!
P.S Been using kgp for a while and want to say thanks for a great addon. I have had no problems with this but have never been any good with scripting! thanks again :)
My thought would be to test for the existence of party1 which is always the first person in the group. Your OnUpdate (or OnEvent depending on how you set up your OnLoad calls) would be something like this:
--For the panel you want to show in party
if UnitExists("party1") ~= nil then
self:Show()
else
self:Hide()
end
--For the panel you want to show when solo
if UnitExists("party1") ~= nil then
self:Hide()
else
self:Show()
end
Syntax might not be 100%, but I blame that on the copious amounts of afternoon scotch I've had and the fact that I'm drycoding without testing (mostly the scotch though).
I'd like to show/hide an addon that recycles frames (so they can only be accessed as variables), there is no normal frame name etc. Is it possible with kgpanels?
What's the addon and what are the conditions under which it shows or hides its own frames?
EDIT: Didn't notice how long my necro reached back. Sorry for that.
OK, now that I'm firing on all 8 cylinders, try this: mySLDT is the name of the kgPanel I want to parent the SLDT frame to. SLDT_Mail is the name of the SLDT frame I'm using in the example.
OnLoad code:
self:RegisterEvent("PLAYER_ENTERING_WORLD")
because the SLDT frames aren't created when SLDT fires its "I'm loaded" signal.
I hope someone might be able to help me here - I am trying to create a frame that dynamically changes size based on that of another frame. In particular, I am using Raven and I have a panel behind a set of bars - however I cannot get it to resize to encompass any new bars that are created, can anyone help please?
So, did anyone find out how you can fade (or hell even just hide) a panel when the chatpanel either fades (panel fades with it) or waits until the chatpanel completely goes 0% trans (and panel would just instantly hide)?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Is there a way to automaticly aktivate a layout for every char on its own.
So that the Layout PALA loads when i loggin with the Pala...and so one?
Because a layout ich only can activate per hand :(
I created 2 Layouts. when i have activate layout one, this layout has been also activatet at all other chars.
I´m sure in past i´ve made it per Profiles, i´ve never switched any Layouts befor Patch 4.x
Maybe there is a bug in KGP?
This is the code I have to parent to the stance bar, but I'm struggling with the additional code to hide it on talent swap. Changing stance, then doing a /reloadui works, but I want / would like it to be automatic;)
if class == "PRIEST" then
local w = BT4BarStanceBarOverlay:GetWidth()
local h = BT4BarStanceBarOverlay:GetHeight()
if w >= 2 then
self:SetWidth(44)
self:SetHeight(44)
self:Show()
else
self:Hide()
end
This forms part of a larger overall "onload" script that covers me for all my toons (I have one of each class @80). New talents are not an issue, so don't worry about that.
So, everythig works...you´ve been right with the layouts.
Big thank´s
@ Eldavido:
In the Profiles there can be chosen a 2nd Profil for the 2nd specc...isn´t it what you need?
Thanks mate, but sadly the dual profile thing didn't work. I still have the issue with this particular frame not updating on spec change :(
I'm still open to ideas :)
EDIT:
In OnLoad:
local spacing = 2
local borderW = 12
local borderH = 9
local offsetX = 0
local offsetY = 2
local w = 31
local h = 31
local scale = BT4BarStanceBar:GetScale()
local buttonCount = GetNumShapeshiftForms()
local totalButtonWidth = floor(buttonCount*w)
local totalBarHeight = floor(h+4)
if buttonCount >= 1 then
if buttonCount == 1 then
local totalButtonSpacing = floor(buttonCount)
local totalBarWidth = floor((totalButtonWidth+totalButtonSpacing)+borderW)
self:SetWidth(totalBarWidth)
else
local totalButtonSpacing = floor((buttonCount-1)*spacing)
local totalBarWidth = floor(totalButtonWidth+totalButtonSpacing+borderW)
self:SetWidth(totalBarWidth)
end
self:SetScale(scale)
self:SetHeight(floor(totalBarHeight+borderH))
self:ClearAllPoints()
self:SetPoint("CENTER", BT4BarStanceBarOverlay, "CENTER", offsetX, offsetY)
self:Show()
else
self:Hide()
end
In OnEvent:
local spacing = 2
local borderW = 12
local borderH = 9
local offsetX = 0
local offsetY = 2
local w = 31
local h = 31
local scale = BT4BarStanceBar:GetScale()
local buttonCount = GetNumShapeshiftForms()
local totalButtonWidth = floor(buttonCount*w)
local totalBarHeight = floor(h+4)
if buttonCount >= 1 then
if buttonCount == 1 then
local totalButtonSpacing = floor(buttonCount)
local totalBarWidth = floor((totalButtonWidth+totalButtonSpacing)+borderW)
self:SetWidth(totalBarWidth)
else
local totalButtonSpacing = floor((buttonCount-1)*spacing)
local totalBarWidth = floor(totalButtonWidth+totalButtonSpacing+borderW)
self:SetWidth(totalBarWidth)
end
self:SetScale(scale)
self:SetHeight(floor(totalBarHeight+borderH))
self:ClearAllPoints()
self:SetPoint("CENTER", BT4BarStanceBarOverlay, "CENTER", offsetX, offsetY)
self:Show()
else
self:Hide()
end
I Found this on another forum, though I modded it a bit. It works to a fashion, any idea on how to make it priest specific? i.e only show if class is priest, not for any other class??
Thanks
For example, I want my panel shows the RP-GG (Rocket-Propelled in Wintergrasp), what happens if I do:
[HTML]DominosActionButton36: ClearAllPoints ()
DominosActionButton36: SetPoint ("TopLeft" kgPanels: FetchFrame ("Explo_Dom8"), "TopLeft", 6, -19)
DominosActionButton36: SetAlpha (0)[/HTML]
The panel then retrieves the slot I want. But now I want the argument executes only if I have the item in my inventory, otherwise, my panel disappears.
Any Ideas? :confused:
All I am looking to do is use a script on 2 different panels. One of these panels is to only be visible when solo, the other is to only be visible when in a group with 1 other or more. I dont need either to resize, or anything complex, just to show or hide when required.
No doubt this will be a simple script for those that can do it but I have looked and googled and have not found it. I have found scripts for a lot of other more complex uses but not for this.
I am currently making my way through this large and informative thread. Currently on page 40, I will keep reading but I am afraid it will either not be ther due to it being simple or I might have missed it due to my noobness with scripting.
So any advice or tips or scripts for these 2 panels would be very greatly appreciated!
P.S Been using kgp for a while and want to say thanks for a great addon. I have had no problems with this but have never been any good with scripting! thanks again :)
Does anyone know?
My thought would be to test for the existence of party1 which is always the first person in the group. Your OnUpdate (or OnEvent depending on how you set up your OnLoad calls) would be something like this:
--For the panel you want to show in party
if UnitExists("party1") ~= nil then
self:Show()
else
self:Hide()
end
--For the panel you want to show when solo
if UnitExists("party1") ~= nil then
self:Hide()
else
self:Show()
end
Syntax might not be 100%, but I blame that on the copious amounts of afternoon scotch I've had and the fact that I'm drycoding without testing (mostly the scotch though).
What's the addon and what are the conditions under which it shows or hides its own frames?
EDIT: Didn't notice how long my necro reached back. Sorry for that.
cormanthor, you are the man!:banana: Your hints got me to the final solution:
so, as you suggested first of all put in OnLoad
Then put in OnEvent
in order to align SLDT_Mail centered to the respektiv kgpanel (self).
In my case the phrase
did nothing at all!
Only the SetPoint()-phrase, as shown above, put my SLDT-Block right where I wanted it.
Thanks for your help! Hopefully people with similar problems will find this solution here!