I need some help working with borders. It seems I am getting some really bad pixel shift/border clipping when I resize my panels which makes my interface look like crap. Initially I had my UI scaled down some since I am playing on a 1366x768 display resolution and a post in this thread caused me to try disabling scaling. I've tried absolute sizes and percentages but nothing seems to help. Any pointers or tips that can stop this problem?
hide panel normally
show panel when stealth is active
hide when i leave stealth again
i've tried using "UPDATE_STEALTH" but i cant seem to get it to work. right now im trying:
OnLoad
OnEvent
note that this is specifically for a rogue using stealth
if anyone could offer any kind of help, that would be greatly appreciated. thanks!
This is weird. I've been toying with this to see what I could come up with and if I do the following on my Druid (no Rogue with stealth) I can get what you want, but the function IsStealth is not returning 1 when I am stealthed per WowWiki's API info, it is acutally returning nil when I am stealthed.
OnLoad:
self:RegisterEvent("UPDATE_SHAPESHIFT_FORMS")
OnEvent:
if IsStealthed() then
self:Hide()
else
self:Show()
end
Edit: I did some more testing because I assumed maybe it is firing the even multiple times for the shift to stealth, but no dice. I changed OnEven to have just Out("Test") to get some output to chat box. I got a single shift event when I shift from cat to normal, 10 outputs of test when I shift from normal to cat, and only one when I stealth. So I just don't see how IsStealthed() returns 1 for stealth.
yea i cant really figure it out myself... still playing around with it though.
any more help is appreciated.
edit: i figured it out and got it to work for me. here it is for any other rogues or druids.
instead of using "UPDATE_SHAPESHIFT_FORMS" i used "UPDATE_SHAPESHIFT_FORM".
From a Blizzard poster:
UPDATE_SHAPESHIFT_FORMS -- Fired when the available set of forms changes (i.e. on skill gain)
UPDATE_SHAPESHIFT_FORM -- Fired when the current form changes.
anyways heres the code to hide a panel when you're not in stealth and to show when you ARE in stealth (example: a panel for my stealth bar that dissapears when i leave stealth and my normal bars come up)
i've been scouring the forum here looking for a bead on how to script something. tried out the sample scripts, too. all to no avail. hoping one of youse guys can help with something.
i've recently started to use kgpanels, and love the mod. i've got my ui well on the way to being the super-sexiest i've ever had it. i have to admit, tho, i've got no clue when it comes to scripting and have pretty much relied on other people's creations. found some great, simple panels and have figured out from these forums how to get them working by parenting them to my pitbull frames, etc. but there's one more thing i'd really like to do:
i use monkeyquest and want to parent/anchor a panel to the detached quest list it provides. the only thing is, i really wish i were able to get the panel to expand and collapse with the frame as i click to open zones and the like. tried it a few different ways to no avail. if anyone can offer help with a script for this and where to put said scripts in the kgpanels config, i'd greatly appreciate it.
also, in the scripts i've been looking at, i've noticed that different lines in the script start at different points into the line. is this because the scripts require the use of the "tab" key, or "space" key for a specific number of spaces? does this make a difference?
have you tried "Border Edge Size" inside Texture Options within your panel?
Yes, I have. The problem is that when I create the panel then reposition or resize the frame it sometimes clips all or part of one or more of the borders that I've set requiring me to increment the width or height to make it visible. Most assuredly a pain in the buttocks.
adaroundtown:
Have you tried setting you height/width as a percentage? I don't see why this wouldn't allow the panel to resize with your quest tracker. If not, I am sure someone can come up with a script to help.
Have you tried setting you height/width as a percentage? I don't see why this wouldn't allow the panel to resize with your quest tracker. If not, I am sure someone can come up with a script to help.[/QUOTE]
thanks for the advice, Skalded, I'll give it a try. do you mean: parent the panel to my monkeyquest frame, and then in the config menu, set it for 100% of the frame? i can see how that might work. or do you mean to create a script for the percentage part? (total noob about scripting). gonna give it a go now and see how it works.
thanks again!
Just tried your advice, Skalded. i entered in 150% to the panels width and 100% to the panels height. when expanding one of the zones, the whole panel just shifts down and doesn't expand with the MonkeyQuestFrame. ah well. it was worth a shot. if someone out there doesn't mind helping out with a script, I'd greatly appreciate it.
thanks for the advice, Skalded!
Just tried your advice, Skalded. i entered in 150% to the panels width and 100% to the panels height. when expanding one of the zones, the whole panel just shifts down and doesn't expand with the MonkeyQuestFrame. ah well. it was worth a shot. if someone out there doesn't mind helping out with a script, I'd greatly appreciate it.
thanks for the advice, Skalded!
Ok, here you go, enter this code in the indicated script blocks.
OnLoad:
self.resized = false
OnUpdate:
if not self.resized then
MonkeyQuestFrame:SetScript("OnSizeChanged", function(f)
self:SetWidth(f:GetWidth())
self:SetHeight(f:GetHeight())
end)
self:SetWidth(MonkeyQuestFrame:GetWidth() + 20)
self:SetHeight(MonkeyQuestFrame:GetHeight() + 20)
end
Now here is the deal with the last lines that have + 20. If you want your panel to be the exact size of your MonkeyQuestFrame then remove the + 20, or you can increase or decrease 20 to your liking. Obviously you should parent and anchor your panel to MonkeyQuestFrame, otherwise you'll have a panel in the middle of the screen that expands and contracts :eek:.
Skalded, sir! You rock my world. Worked like a charm, and did exactly what i wanted it too. i actually set the +number values you mentioned to +110 and +15 to get it to frame the monkeyquest tracker just the way i wanted.
thanks again for the help O Script King!
adaroundtown
Skalded, sir! You rock my world. Worked like a charm, and did exactly what i wanted it too. i actually set the +number values you mentioned to +110 and +15 to get it to frame the monkeyquest tracker just the way i wanted.
thanks again for the help O Script King!
adaroundtown
lawl, me script king? Nope, I just stole it from the script samples and changed ChatFrame to MonkeyQuestFrame ;D
hmmm. when i tried to do that, it didn't work. do you know what the deal is on the spacing at the beginning of lines in script? maybe that's where i went wrong. well, either way, thanks again!
hmmm. when i tried to do that, it didn't work. do you know what the deal is on the spacing at the beginning of lines in script? maybe that's where i went wrong. well, either way, thanks again!
Nah, it will work without the spacing. I put those in out of habit and it is easier to read with the code indented that runs inside a function, if, for/next, etc.
After reading the numerous pages, and getting some example I adapted a script to simply hide Recount_MainWindow when I am not fighting, and showing when I start the fight.
Thats a beginning to learn scripting with KGpanels.
if (event == "PLAYER_REGEN_ENABLED") then
Recount_MainWindow:Hide()
elseif event == "PLAYER_REGEN_DISABLED" then
Recount_MainWindow:Show()
end
So far the window shows when I start fighting and hide when I stop.
But if I take a portal, or simply log in game, then Recount shows.
So if I could get a little help to finalise my script I would appreciate.
-----
Also I was curious to understand and sorry if my question is silly but I thought that with the patch our Regen stopped at rest and start at fight.
If so that would mean that PLAYER_REGEN_ENABLED is now the beginning of the fight no ?
Would just like to start off by saying that Kgpanels is awesome... when it works.
I've got a major problem with my panels. My UI textures seem to disappear between log ons. I successfully created a UI to my liking two days ago and it worked perfectly and looked fine. When I logged on yesterday however, it was gone. Just grey space in its place. I spent a great deal of time recreating them in Photoshop and reconfiguring them in kgpanels. It took a while, but I finally got there. Now when I logged on today, the same thing... a grey space in its place, my artwork is gone. I can't even preview it anymore under the artwork menu. I haven't been messing about in the directory or anything so what am I doing wrong?
hide panel normally
show panel when stealth is active
hide when i leave stealth again
i've tried using "UPDATE_STEALTH" but i cant seem to get it to work. right now im trying:
OnLoad
OnEvent
note that this is specifically for a rogue using stealth
if anyone could offer any kind of help, that would be greatly appreciated. thanks!
This is weird. I've been toying with this to see what I could come up with and if I do the following on my Druid (no Rogue with stealth) I can get what you want, but the function IsStealth is not returning 1 when I am stealthed per WowWiki's API info, it is acutally returning nil when I am stealthed.
OnLoad:
OnEvent:
Edit: I did some more testing because I assumed maybe it is firing the even multiple times for the shift to stealth, but no dice. I changed OnEven to have just Out("Test") to get some output to chat box. I got a single shift event when I shift from cat to normal, 10 outputs of test when I shift from normal to cat, and only one when I stealth. So I just don't see how IsStealthed() returns 1 for stealth.
yea i cant really figure it out myself... still playing around with it though.
any more help is appreciated.
edit: i figured it out and got it to work for me. here it is for any other rogues or druids.
instead of using "UPDATE_SHAPESHIFT_FORMS" i used "UPDATE_SHAPESHIFT_FORM".
From a Blizzard poster:
anyways heres the code to hide a panel when you're not in stealth and to show when you ARE in stealth (example: a panel for my stealth bar that dissapears when i leave stealth and my normal bars come up)
OnLoad
OnEvent
use the above for your stealth bar panel. and switch it around for your normal bars panel.
i've recently started to use kgpanels, and love the mod. i've got my ui well on the way to being the super-sexiest i've ever had it. i have to admit, tho, i've got no clue when it comes to scripting and have pretty much relied on other people's creations. found some great, simple panels and have figured out from these forums how to get them working by parenting them to my pitbull frames, etc. but there's one more thing i'd really like to do:
i use monkeyquest and want to parent/anchor a panel to the detached quest list it provides. the only thing is, i really wish i were able to get the panel to expand and collapse with the frame as i click to open zones and the like. tried it a few different ways to no avail. if anyone can offer help with a script for this and where to put said scripts in the kgpanels config, i'd greatly appreciate it.
also, in the scripts i've been looking at, i've noticed that different lines in the script start at different points into the line. is this because the scripts require the use of the "tab" key, or "space" key for a specific number of spaces? does this make a difference?
cheers for your help, guys!
have you tried "Border Edge Size" inside Texture Options within your panel?
Yes, I have. The problem is that when I create the panel then reposition or resize the frame it sometimes clips all or part of one or more of the borders that I've set requiring me to increment the width or height to make it visible. Most assuredly a pain in the buttocks.
adaroundtown:
Have you tried setting you height/width as a percentage? I don't see why this wouldn't allow the panel to resize with your quest tracker. If not, I am sure someone can come up with a script to help.
Have you tried setting you height/width as a percentage? I don't see why this wouldn't allow the panel to resize with your quest tracker. If not, I am sure someone can come up with a script to help.[/QUOTE]
thanks for the advice, Skalded, I'll give it a try. do you mean: parent the panel to my monkeyquest frame, and then in the config menu, set it for 100% of the frame? i can see how that might work. or do you mean to create a script for the percentage part? (total noob about scripting). gonna give it a go now and see how it works.
thanks again!
thanks for the advice, Skalded!
Ok, here you go, enter this code in the indicated script blocks.
OnLoad:
OnUpdate:
Now here is the deal with the last lines that have + 20. If you want your panel to be the exact size of your MonkeyQuestFrame then remove the + 20, or you can increase or decrease 20 to your liking. Obviously you should parent and anchor your panel to MonkeyQuestFrame, otherwise you'll have a panel in the middle of the screen that expands and contracts :eek:.
Hope that helped.
thanks again for the help O Script King!
adaroundtown
lawl, me script king? Nope, I just stole it from the script samples and changed ChatFrame to MonkeyQuestFrame ;D
Nah, it will work without the spacing. I put those in out of habit and it is easier to read with the code indented that runs inside a function, if, for/next, etc.
Thats a beginning to learn scripting with KGpanels.
Script :
On Load
On Event
So far the window shows when I start fighting and hide when I stop.
But if I take a portal, or simply log in game, then Recount shows.
So if I could get a little help to finalise my script I would appreciate.
-----
Also I was curious to understand and sorry if my question is silly but I thought that with the patch our Regen stopped at rest and start at fight.
If so that would mean that PLAYER_REGEN_ENABLED is now the beginning of the fight no ?
Thank you
Would just like to start off by saying that Kgpanels is awesome... when it works.
I've got a major problem with my panels. My UI textures seem to disappear between log ons. I successfully created a UI to my liking two days ago and it worked perfectly and looked fine. When I logged on yesterday however, it was gone. Just grey space in its place. I spent a great deal of time recreating them in Photoshop and reconfiguring them in kgpanels. It took a while, but I finally got there. Now when I logged on today, the same thing... a grey space in its place, my artwork is gone. I can't even preview it anymore under the artwork menu. I haven't been messing about in the directory or anything so what am I doing wrong?
Location: \\Interface\AddOns\textures