"Unhiding" RuneFrame
Hi
In my addon RuneHUD I've used a simple fix to stop addons which hides the player unitframe to stop hiding the RuneFrame by simply changing it's parent to a new frame. If I do this after 7.0 I get error messages since Blizzard changed the RuneFrame.lua in FrameXML to suport 7 runes. The change they made is the following: Code:
function RuneFrame_UpdateNumberOfShownRunes() |
Have you tried to give the .unit key the value "player" on the frame you're parenting the runeframe to?
|
Quote:
|
Quote:
Lua Code:
|
Now I feel kinda stupid for not trying that... So bascially framename.unit is just a global variable? And yes that do work, thanks a lot for the help! :)
|
No, "framename" is a global variable, pointing to the object by that name, which (in the case of a frame) a table, which has a "unit" key. You can access it and set its keys/values just like any other table.
/dump PlayerFrame:GetObjectType() ==> "table" /dump PlayerFrame.unit:GetObjectType() ==> "string" /dump PlayerFrame.unit ==> "player" |
What she said:P
|
Also, rather than setting generic keys like "unit" on arbitrary frames that don't belong to you (like the UIParent) it's probably better to create an intermediate frame, and parent the RuneFrame to that. Then you don't have to worry about overriding, or being overridden by, other addons or default UI code.
lua Code:
|
I'm pretty sure that is what Ereki did, to stop the Runeframe being hidden by addons that hide the Playerframe. That's why the unit was missing,.
|
I assumed it was just being reparented to the UIParent, like it was in previous versions of the game, but I could be wrong.
|
Ah I understand, didn't think of that possibility:)
|
Try this.
Lua Code:
|
That won't help. The frame has been reparented, and the issue is that it depends on properties on its parent frame; the solution is to set those properties on the new parent. You may want to consider reading the thread before posting next time.
|
All times are GMT -6. The time now is 08:10 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI