Finally got round to giving the mod a shot, looks like I'll be fiddling with this and not actually playing WoW for the next few days.
As a little extension to the scripting to set a panel colour posted earlier in the thread, is it possible to use the scripting to set background and/or border colour based on character class?
Sure. You'd need to create a table storing all the class colors (or access a loaded library that has them) and then come up with the script that changes the color based on your target or whatever you're using as a reference.
hey. i've got a question. i've seen many ppl than managed to parent eepanels to omen. what frame do u parent it to ? i've tried with OmenAnchor i think it was, and everytime omen resetted or i switched target, the eepanel got totally screwed up :/
and how do i copy the settings/panels from one account to another. i tried to simply copy the saved variables files, but that didnt really work. the panels i have on one account didnt show on the other account. any ideas ?
It depends on which profile you set the eePanels up on in the first account. If it's default, then they should show up right away. If it's not, then you'll have to choose the profile yourself in the menu.
Hey guys, just wanted to share a script with you:)
Make an eePanel show when in a raid and in a group, and hide when not:
Do not display in Battleground or Arena
-- Change our panel's visibility when in/out of a raid
function eePanels2:RaidPanelVisibility(self, event, ...)
-- If we're in a raid
if GetNumPartyMembers() > 0
and not ((select(2, IsInIstance()) == "pvp" or select(2, IsInInstance()) == "arena")
or GetNumRaidMembers() > 0
and not ((select(2, IsInIstance()) == "pvp" or select(2, IsInInstance()) == "arena")
then
-- Show the panel this script is attached to
THIS:Show()
-- If we're not in a raid
else
-- Hide the panel this script is attached to
THIS:Hide()
end
end
-- Ace2 event listeners; can't do this in more than one script
eePanels2:RegisterEvent("PLAYER_ENTERING_WORLD", eePanels2.RaidPanelVisibility)
eePanels2:RegisterEvent("PARTY_MEMBERS_CHANGED", eePanels2.RaidPanelVisibility)
eePanels2:RegisterEvent("RAID_ROSTER_UPDATE", eePanels2.RaidPanelVisibility)
Quite nice if you do not want to have your Omen/Ktm Swstats cluttering your screen while doing PvP
So I'm using the script in the second post to resize a couple panels when Grid changes size, but I seem to be running into the AceHook error posted earlier in the thread, I'm assuming it's because the Grid frame isn't loaded when eePanels tries to hook to it.
Is there any way to delay the running of the script to get this to work without it throwing the error and me needing to open the script editor after every reload?
{Edit: Ignore that part, managed to fix it by adding Grid to the eePanels toc)
PS: Also any hints on changing the panel colours on character class? Still not having any luck trying to work that one out.
Anyone have a good mouseover script to show/hide a panel? Also, is it necessary to use an onupdate event in order to make this work? If so, is the memory consumption more hassel than it's worth?
Btw, this is to add a panel to a Bartender3 bar with the fadeout setting enabled. The attached eePanel isn't hiding properly because the bars don't technically show/hide on mouseover (they just change alpha).
So I'm using the script in the second post to resize a couple panels when Grid changes size, but I seem to be running into the AceHook error posted earlier in the thread, I'm assuming it's because the Grid frame isn't loaded when eePanels tries to hook to it.
Is there any way to delay the running of the script to get this to work without it throwing the error and me needing to open the script editor after every reload?
{Edit: Ignore that part, managed to fix it by adding Grid to the eePanels toc)
PS: Also any hints on changing the panel colours on character class? Still not having any luck trying to work that one out.
Take this script from page 7:
function eePanels2:TargetFrameVisibility(self, event, ...)
if(UnitExists("target")) = 1 then
eePanel1:Show()
else
eePanel1:Hide()
end
end
eePanels2:RegisterEvent("PLAYER_ENTERING_WORLD", eePanels2.TargetFrameVisibility)
eePanels2:RegisterEvent("PLAYER_TARGET_CHANGED", eePanels2.TargetFrameVisibility)
And instead of:
if(UnitExists("target")) = 1 then
eePanel1:Show()
else
eePanel1:Hide()
end
You'll need to do:
if(UnitExists("target")) then
local _, class = UnitClass("target");
if class == "WARRIOR" then
THIS:SetBackdropBorderColor(someR,someG,someB,alpha)
elseif class == "PRIEST" then
THIS:SetBackdropBorderColor(someR,someG,someB,alpha)
elseif ... then
...
end
end
Would there be any way to use the scripting function in EEpanels to generate text? I would really like to do away with the stance bar in my UI and replace it with a simple text using GetsShapeshiftFormInfo. Will the script function support this?
Yes, but you'll need to know what you're doing. WoW frames have the ability to display text, and scripts can do just about anything possible via the WoW API. A simple script to display text (which I haven't tested, but looks ok) would be this:
local THIS_text = THIS:CreateFontString(nil, "OVERLAY ") -- set strata of text;
THIS_text:SetFontObject(GameFontHighlightSmall) -- Set the font type
THIS_text:SetPoint("CENTER", THIS, "CENTER", 0, 0) -- center the text
THIS_text:SetText("big badda boom") -- text to display
You'll have to figure out the rest on your own
So it seems like the following function should work for determining the text variables for stance, but how do I tie it in with the code above?
function eePanels2:StanceText (self, event,...)
if GetShapeShiftForm() = 0 then
eePanel4_text:SetText ("Caster Form")
elseif GetShapeShiftForm() = 1 then
eePanel4_text:SetText ("Dire Bear Form")
elseif GetShapeShiftForm() = 2 then
eePanel4_text:SetText ("Aquatic Form")
elseif GetShapeShiftForm() = 3 then
eePanel4_text:SetText ("Cat Form")
elseif GetShapeShiftForm() = 4 then
eePanel4_text:SetText ("Travel Form")
end
end
Is there any way to set it to modify colours for more than one panel in the same script though to save needing a script per panel? If I just enter a list of panels on their own lines it errors out on a reload and only skins the first panel listed.
Also is there any way to check if an addon is loaded before running a script? I get errors about Grid if it's not loaded (I prefer to only load it when I'm using it).
I'm not sure what you're asking. The entire code - assuming it all works correctly - would simply be like this:
local THIS_text = THIS:CreateFontString(nil, "OVERLAY ") -- set strata of text;
THIS_text:SetFontObject(GameFontHighlightSmall) -- Set the font type
THIS_text:SetPoint("CENTER", THIS, "CENTER", 0, 0) -- center the text
function eePanels2:StanceText (self, event,...)
if GetShapeShiftForm() = 0 then
THIS_text:SetText ("Caster Form")
elseif GetShapeShiftForm() = 1 then
THIS_text:SetText ("Dire Bear Form")
elseif GetShapeShiftForm() = 2 then
THIS_text:SetText ("Aquatic Form")
elseif GetShapeShiftForm() = 3 then
THIS_text:SetText ("Cat Form")
elseif GetShapeShiftForm() = 4 then
THIS_text:SetText ("Travel Form")
end
end
eePanels2:RegisterEvent("PLAYER_ENTERING_WORLD", eePanels2.StanceText)
eePanels2:RegisterEvent("UPDATE_SHAPESHIFT_FORMS", eePanels2.StanceText)
Is there any way to set it to modify colours for more than one panel in the same script though to save needing a script per panel? If I just enter a list of panels on their own lines it errors out on a reload and only skins the first panel listed.
Also is there any way to check if an addon is loaded before running a script? I get errors about Grid if it's not loaded (I prefer to only load it when I'm using it).
You can simply do eePanels1:SetBackdropBorderColor(); eePanels2:SetBackdropBorderColor(); etc.
Bear in mind that if you're trying to do this in, say, eePanels1, you'd get an error because the script might be executing right when it's loaded before eePanel2 is created. If you put this in eePanel2 you'd be ok, because eePanel1 would already have been created.
To check if an addon is loaded, your best bet is to lsee if the/a addon's frame exists in the global environment. Something like:
local gridExists = getglobal("NAME_OF_GRID_FRAME_HERE") -- this will be nil if it doesn't exist
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Are you sure the right textures are under the right party member?
I think you're right. IIRC you can turn it off though, that might fix it.
You're right. I've just put up a new version which lets you modify the background texture opacity.
You sir, are the man. Thanks!
Thank you! That is one thing I've been wanting but kept forgetting to ask for. :)
As a little extension to the scripting to set a panel colour posted earlier in the thread, is it possible to use the scripting to set background and/or border colour based on character class?
The code should be
or
and how do i copy the settings/panels from one account to another. i tried to simply copy the saved variables files, but that didnt really work. the panels i have on one account didnt show on the other account. any ideas ?
thx for the help in advance :)
Make an eePanel show when in a raid and in a group, and hide when not:
Do not display in Battleground or Arena
Quite nice if you do not want to have your Omen/Ktm Swstats cluttering your screen while doing PvP
Is there any way to delay the running of the script to get this to work without it throwing the error and me needing to open the script editor after every reload?
{Edit: Ignore that part, managed to fix it by adding Grid to the eePanels toc)
PS: Also any hints on changing the panel colours on character class? Still not having any luck trying to work that one out.
Btw, this is to add a panel to a Bartender3 bar with the fadeout setting enabled. The attached eePanel isn't hiding properly because the bars don't technically show/hide on mouseover (they just change alpha).
Take this script from page 7:
And instead of:
You'll need to do:
So it seems like the following function should work for determining the text variables for stance, but how do I tie it in with the code above?
function eePanels2:StanceText (self, event,...)
if GetShapeShiftForm() = 0 then
eePanel4_text:SetText ("Caster Form")
elseif GetShapeShiftForm() = 1 then
eePanel4_text:SetText ("Dire Bear Form")
elseif GetShapeShiftForm() = 2 then
eePanel4_text:SetText ("Aquatic Form")
elseif GetShapeShiftForm() = 3 then
eePanel4_text:SetText ("Cat Form")
elseif GetShapeShiftForm() = 4 then
eePanel4_text:SetText ("Travel Form")
end
end
eePanels2:RegisterEvent("PLAYER_ENTERING_WORLD", eePanels2.StanceText)
eePanels2:RegisterEvent("UPDATE_SHAPESHIFT_FORMS", eePanels2.StanceText)
Is there any way to set it to modify colours for more than one panel in the same script though to save needing a script per panel? If I just enter a list of panels on their own lines it errors out on a reload and only skins the first panel listed.
Also is there any way to check if an addon is loaded before running a script? I get errors about Grid if it's not loaded (I prefer to only load it when I'm using it).
I'm not sure what you're asking. The entire code - assuming it all works correctly - would simply be like this:
You can simply do eePanels1:SetBackdropBorderColor(); eePanels2:SetBackdropBorderColor(); etc.
Bear in mind that if you're trying to do this in, say, eePanels1, you'd get an error because the script might be executing right when it's loaded before eePanel2 is created. If you put this in eePanel2 you'd be ok, because eePanel1 would already have been created.
To check if an addon is loaded, your best bet is to lsee if the/a addon's frame exists in the global environment. Something like: