"If Death Knight"; If Pet Alive...
I've got a simple Problem at my interface..
I created some panels like in alekk ui, but one of them should only be activated if the character's pet is alive and the other should only be activated if the character got a stance bar with variable size... How can i tell wow: "If Character is Druid, do panel druid stance bar", and so on? How to: "If pet is alive, create pet panel, if pet is dismissed or dead, erase pet panel" The Bars inside the panels are from Bartender. I post the 2 postitions and my lua code for them: --PetBar CreatePanel("aPanels_PetBar01",0,0,218,31,background,border,"BOTTOMRIGHT","TOPRIGHT","aPanels_MButtons01",UIParent) CreatePanel("aPanels_PetBar02",0,0,218,31,background,border,"BOTTOMRIGHT","TOPRIGHT","aPanels_MButtons01",UIParent) --DruidStanceBar CreatePanel("aPanels_StanceBar01",0,0,114,31,background,border,"BOTTOMLEFT","TOPLEFT","aPanels_MButtons01",UIParent) CreatePanel("aPanels_StanceBar02",0,0,114,31,background,border,"BOTTOMLEFT","TOPLEFT","aPanels_MButtons01",UIParent) |
You would want to make the parent of your panels the frames that they should hide/show with. That said, I'm not familiar with that UI but assuming the UIParent in those function calls is the parent being passed:
Code:
--PetBar |
Fine, it isnt perfect now, but your hint was good.
I changed the line for the pet frame into: --PetBar CreatePanel("aPanels_PetBar01",0,0,218,31,background,border,"BOTTOMRIGHT","TOPRIGHT","aPanels_MButtons01",BT4BarPetBar) CreatePanel("aPanels_PetBar02",0,0,218,31,background,border,"BOTTOMRIGHT","TOPRIGHT","aPanels_MButtons01",BT4BarPetBar) The Result: The Panel appears when i call a pet and disappears when i dismiss my pet, but the panel got the wrong size now :< The Pet Bar in Bartender is scaled 0.65 - I think that's the reason why the panel scales down too? How can i fix this? :< |
Just multiply the sizes with a number to make the scale seem as 1.
Try different numbers untill you get what you want. 218*1.35 for an example. |
You don't even need to do that. Just reset the size of the panels to what you wish them to be.
|
I did it now with the scale, this works, but i'm interested in the last post, how to resize them? :>
Last question in this thread: It finally worked with the petbar, but not with the stancebar, because a druid got 5 stances, a DK only 3 and so on. Is it possible to build in something like "if DK then panel a, if druide then panel b"?? |
I'm assuming one of those numbers in the CreatePanel function is for height and another is for width?
|
Sure, but the pet bar is scaled down with 0.65 and the panel is scaled down too with the same 0.65, I dont know why... becasue of that i'd scaled up this panel by 1,538 to match the right size..
|
Children frames inherit the scale of their parents.
|
petbar is fine now, a lot of thanks!
but how should i handle the problem with the stancebar? at the moment, i gave the stancebar a fix width, but when i'm playing a druid instead of my dk, the stancebar is much longer than the panel... any ideas? :\ |
Noone got an idea? Please help me =(
|
Code:
--StanceBar |
All times are GMT -6. The time now is 07:32 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI