I just figured out this so i tough maybe other ppl will find it useful.
If you are using Minichat, and have some panels with border using 1 panel for the bg, and 1 panel for the border.
and you want ur panels to minimize with the chat parent ur bgpanel to ChatFrameX, "Anchor to"&"Anchor from" set as middle.Here's the Lua script.
-- Create a new ace2 addon for hooking
THIS_Hook = AceLibrary("AceAddon-2.0"):new("AceHook-2.1")
-- Create a function to resize the eePanel when the hooked frame is resized
function THIS_Hook:OnSizeChanged(frame, ...)
THIS:SetHeight(frame:GetHeight() + 15) --Note: The "+ 15" is to have a lil gap between panel side and actual text area. Same reason i have my BGPanel width set to 105%.
end
-- Hook to the frame we want to resize against (ChatFrame1 here)
THIS_Hook:HookScript(ChatFrame1, "OnSizeChanged")
Then, parent ur "BorderPanel" to eePanelX(the BGpanel). Anchors in middle too. Set the panel width to fit the desired border since we are not touching it with the script.
And here's the script.
-- Create a new ace2 addon for hooking
THIS_Hook = AceLibrary("AceAddon-2.0"):new("AceHook-2.1")
-- Create a function to resize the eePanel when the hooked frame is resized
function THIS_Hook:OnSizeChanged(frame, ...)
THIS:SetHeight(frame:GetHeight()+10)
end
-- Hook to the frame we want to resize against (ChatFrame1 here)
THIS_Hook:HookScript(eePanelX, "OnSizeChanged") --the eePanelX is the eepanel you want to spy
Do you think it would be possible to add a "Duplicate this frame" option in each individual frame options? So if used it would create a new panel with the same settings as that panel.
I dunno. Maybe. It probably wouldn't be too tough, but it would have ALL the same options as the copied frame, including parent anchor and positioning. In the end, I'm not sure how much people would benefit from it. I'll look into it though.
I have a panel parented to my omen frame and that appears as it should my problem is that i have created 4 additional frames 1 at top 1 at bottom 1 on the left and 1 on the right, this is to create a boarder around my omen background panel,
The 4 boarders i parented to Omen background (eePanelGuideFrame20) got there sizes and positions correct and all looked as it should.
The problem is when i locked all the panels my boarders around eePanelGuideFrame20 disappeared and i cant seem to get them back, the settings for these 4 are still in then panels settings menu but i'm unable to see the panels them self.
I tried a /rl to no avail so any ideas on how to fix this would be great
THIS:Show()
-- Hide panel ooc
function eePanels2:PLAYER_REGEN_DISABLED()
THIS:Hide()
end
-- Hide panel ic
function eePanels2:PLAYER_REGEN_ENABLED()
THIS:Show()
end
...
That actually shows the panel when not in combat and hides when in combat. Health regen is disabled in combat and enabled out of combat. Also the comment lines both say "hide" but that's just a minor thing :P
I have a panel parented to my omen frame and that appears as it should my problem is that i have created 4 additional frames 1 at top 1 at bottom 1 on the left and 1 on the right, this is to create a boarder around my omen background panel,
The 4 boarders i parented to Omen background (eePanelGuideFrame20) got there sizes and positions correct and all looked as it should.
The problem is when i locked all the panels my boarders around eePanelGuideFrame20 disappeared and i cant seem to get them back, the settings for these 4 are still in then panels settings menu but i'm unable to see the panels them self.
I tried a /rl to no avail so any ideas on how to fix this would be great
Unless you use gradient, you should only create 2 panels. put them on top of each other and put 1 on the "Level 1"(maybe need to turn Advanced mode for this), the other on "Level 0", then just put the one in the Level 0 a lil bigger. Takes about 15 sec to create a panel witha border with this technic, instead of several minutes for the other.
@ EE: forgot to say that the new Anchor to/Anchor from is total awsomness :)
That actually shows the panel when not in combat and hides when in combat. Health regen is disabled in combat and enabled out of combat. Also the comment lines both say "hide" but that's just a minor thing :P
Is it possible to make it that different panels, on the same Level, will be ordered by numbers. Meaning that the panel with the lowest number will be on top and higher number will be shown under.
ie: You have BGPanel(eePanel1) and BorderPanel(eePanel2), both are set on the Level 0 because if i put the BGPanel to Level1 its overlapping the minimap and can't see it anymore.
It actually works opposite of that right now though, since the last created panel will have it's level set to 0 last, putting it at the bottom. Aside from that, I'm not putting in any hacks to panel leveling.
I'm having a problem with the mentioned solution for one panel for background and one panel for the border. The background panel (eePanel2) is parented to ChatFrame1 and scripted to resize based on the chat frame while the border panel (eePanel3) is parented to eePanel2 and scripted to resize based on the eePanel2 size (using the scripts above).
Both stratas are set "Background" and like you said, panel#3 should have a lower level than panel#2 but it still jumped to the front after I had created the panels and scripts and resized MiniChat or done /reloadui, can't remember which.
First everything was fine though.
I should probably delete savedvariables and try again cause I'm sure the same thing worked before, but not anymore when I deleted the old panels and created new ones. -_-
It actually works opposite of that right now though, since the last created panel will have it's level set to 0 last, putting it at the bottom. Aside from that, I'm not putting in any hacks to panel leveling.
sounds good to me :) just need to do some panels tweak then.
Been a lurker for a while and "learning" lol.. well kind of
I have been playing with eePanels2 today and getting the general idea from a complete novice point of view, I've always been a compilation downloader until this morning and apart from half inching Caith's very nice Pitbull frames I'm trying to make my own ui.
To the point.. I would like to know how I could make the eePanels behind my Pet Bar, Hunters Aspect and Tracking Bars appear only when I am on my Hunter or on one of my other alts.
The left side will be the aspects bar, but also the stance bar on my other toons, and the right side will be my Pet bar.
Is there anyway to script this, well to be honest, I am asking for a script to do this as my Lua coding ability is like my knowledge of inner workings of the female mind :S
Cheers in advance
p.s. Don't laugh at my eePanels... they ain't finished yet :p
Been a lurker for a while and "learning" lol.. well kind of
I have been playing with eePanels2 today and getting the general idea from a complete novice point of view, I've always been a compilation downloader until this morning and apart from half inching Caith's very nice Pitbull frames I'm trying to make my own ui.
To the point.. I would like to know how I could make the eePanels behind my Pet Bar, Hunters Aspect and Tracking Bars appear only when I am on my Hunter or on one of my other alts.
The left side will be the aspects bar, but also the stance bar on my other toons, and the right side will be my Pet bar.
Is there anyway to script this, well to be honest, I am asking for a script to do this as my Lua coding ability is like my knowledge of inner workings of the female mind :S
Cheers in advance
p.s. Don't laugh at my eePanels... they ain't finished yet :p
Don't need a script for that. In the eePanel2 options, there is a thing called Profile, which you can set to Default/Your specific character/Class/etc..
I had thought of that, the thing is, I only want the eePanel below the PetBar when I have my pet out, which could in theory be any class, not just those that have pets as part of their class. I have a Full Frost Mage, Lock and Hunter, but then I do Karazhan (inc chess event) on my Rogue. Hence the question can the Panel be tied "to the bar". Also I suppose the left side could be thought of the same way, I have a warrior, the rogue (all be it a 1 button stance bar).
I agree with you on the profile front for the Aspect and Tracking Bar as they are only on my hunter so I could have a seperate profile for that toon, cheers :)
I had thought of that, the thing is, I only want the eePanel below the PetBar when I have my pet out, which could in theory be any class, not just those that have pets as part of their class. I have a Full Frost Mage, Lock and Hunter, but then I do Karazhan (inc chess event) on my Rogue. Hence the question can the Panel be tied "to the bar". Also I suppose the left side could be thought of the same way, I have a warrior, the rogue (all be it a 1 button stance bar).
I agree with you on the profile front for the Aspect and Tracking Bar as they are only on my hunter so I could have a seperate profile for that toon, cheers :)
Then you want to use the Parenting function. You need to turn on "Advanced Mode".
Create a macro with this line : /print GetMouseFocus():GetName()
Then mouseover ur pet bar, use that macro and ull get the name in the chat. Then parent ur panels to it. They will show/hide only when the pet bar is shown/hide.
I'm using the script from ee's post to resize a panel when another panel changes size
THIS_Hook = AceLibrary("AceAddon-2.0"):new("AceHook-2.1")
function THIS_Hook:OnSizeChanged(frame, ...)
THIS:SetWidth(frame:GetWidth())
THIS:SetHeight(frame:GetHeight())
end
THIS_Hook:HookScript(ChatFrame1, "OnSizeChanged")
Now I'm no expert on scripting, but is there a line or phrase I can add to this script so it will only resize the height of the panel and not the height and width?
Edit: and the width by itself as well, for a different panel
Edit2: Oh wait. . . could I perhaps just remove the line "THIS:SetWidth(frame:GetWidth())" (I just actually looked at the code just now :P)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
sucks to be you..lol...oops, couldn't resist.
come back then, forget those chicks from the woods they are not good for you healths :P
If you are using Minichat, and have some panels with border using 1 panel for the bg, and 1 panel for the border.
and you want ur panels to minimize with the chat parent ur bgpanel to ChatFrameX, "Anchor to"&"Anchor from" set as middle.Here's the Lua script.
Then, parent ur "BorderPanel" to eePanelX(the BGpanel). Anchors in middle too. Set the panel width to fit the desired border since we are not touching it with the script.
And here's the script.
Everything should work.
ie:
anyway, hope it helps
The 4 boarders i parented to Omen background (eePanelGuideFrame20) got there sizes and positions correct and all looked as it should.
The problem is when i locked all the panels my boarders around eePanelGuideFrame20 disappeared and i cant seem to get them back, the settings for these 4 are still in then panels settings menu but i'm unable to see the panels them self.
I tried a /rl to no avail so any ideas on how to fix this would be great
That actually shows the panel when not in combat and hides when in combat. Health regen is disabled in combat and enabled out of combat. Also the comment lines both say "hide" but that's just a minor thing :P
Unless you use gradient, you should only create 2 panels. put them on top of each other and put 1 on the "Level 1"(maybe need to turn Advanced mode for this), the other on "Level 0", then just put the one in the Level 0 a lil bigger. Takes about 15 sec to create a panel witha border with this technic, instead of several minutes for the other.
@ EE: forgot to say that the new Anchor to/Anchor from is total awsomness :)
Fixed
See Coldfury's response.
Is it possible to make it that different panels, on the same Level, will be ordered by numbers. Meaning that the panel with the lowest number will be on top and higher number will be shown under.
ie: You have BGPanel(eePanel1) and BorderPanel(eePanel2), both are set on the Level 0 because if i put the BGPanel to Level1 its overlapping the minimap and can't see it anymore.
or maybe im doing something wrong too hehe
Both stratas are set "Background" and like you said, panel#3 should have a lower level than panel#2 but it still jumped to the front after I had created the panels and scripts and resized MiniChat or done /reloadui, can't remember which.
First everything was fine though.
I should probably delete savedvariables and try again cause I'm sure the same thing worked before, but not anymore when I deleted the old panels and created new ones. -_-
sounds good to me :) just need to do some panels tweak then.
Been a lurker for a while and "learning" lol.. well kind of
I have been playing with eePanels2 today and getting the general idea from a complete novice point of view, I've always been a compilation downloader until this morning and apart from half inching Caith's very nice Pitbull frames I'm trying to make my own ui.
To the point.. I would like to know how I could make the eePanels behind my Pet Bar, Hunters Aspect and Tracking Bars appear only when I am on my Hunter or on one of my other alts.
The left side will be the aspects bar, but also the stance bar on my other toons, and the right side will be my Pet bar.
Is there anyway to script this, well to be honest, I am asking for a script to do this as my Lua coding ability is like my knowledge of inner workings of the female mind :S
Cheers in advance
p.s. Don't laugh at my eePanels... they ain't finished yet :p
Don't need a script for that. In the eePanel2 options, there is a thing called Profile, which you can set to Default/Your specific character/Class/etc..
I added 0.08 blue and my border appeard in front of the other. Did this at other value too. but they seem to be random.
I had thought of that, the thing is, I only want the eePanel below the PetBar when I have my pet out, which could in theory be any class, not just those that have pets as part of their class. I have a Full Frost Mage, Lock and Hunter, but then I do Karazhan (inc chess event) on my Rogue. Hence the question can the Panel be tied "to the bar". Also I suppose the left side could be thought of the same way, I have a warrior, the rogue (all be it a 1 button stance bar).
I agree with you on the profile front for the Aspect and Tracking Bar as they are only on my hunter so I could have a seperate profile for that toon, cheers :)
Then you want to use the Parenting function. You need to turn on "Advanced Mode".
Create a macro with this line : /print GetMouseFocus():GetName()
Then mouseover ur pet bar, use that macro and ull get the name in the chat. Then parent ur panels to it. They will show/hide only when the pet bar is shown/hide.
Now I'm no expert on scripting, but is there a line or phrase I can add to this script so it will only resize the height of the panel and not the height and width?
Edit: and the width by itself as well, for a different panel
Edit2: Oh wait. . . could I perhaps just remove the line "THIS:SetWidth(frame:GetWidth())" (I just actually looked at the code just now :P)