WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Help with loot frames (https://www.wowinterface.com/forums/showthread.php?t=46348)

10leej 04-26-13 01:09 AM

Help with loot frames
 
1 Attachment(s)
So I'm modifying Game92's loot frames to be standalone for UI/fan update stuffs and gotten the errors worked out (seems mostly cosmetic so I haven't done much at all with the source code) but now I'm stuck at this point where the blizzard frames aren't hiding properly....

my code

image of issue

Haleth 04-26-13 04:14 AM

That's because the code to hide it isn't there. It's probably outdated, the loot frame changed at some point.

Check here:

https://github.com/Ketho/wow-ui-sour.../LootFrame.xml

You can see that it inherits from ButtonFrameTemplate:

https://github.com/Ketho/wow-ui-sour...lTemplates.xml (look for ButtonFrameTemplate)

Most of the code in there is pretty outdated anyway, like the part that works around the taint. And I've no idea what this is supposed to be:

Code:

local i, t = 1, "Interface\\LootFrame\\UI-LootPanel"
while true do
  local r = select(i, _G["LootFrame"]:GetRegions())
  if not r then break end
  if r.GetText and r:GetText() == ITEMS then
    r:ClearAllPoints()
    r:SetPoint("TOP", -12, -19.5)
  elseif r.GetTexture and r:GetTexture() == t then
    r:Hide()
  end
  i = i + 1
end

As opposed to:

Code:

local text = select(19, LootFrame:GetRegions())
text:ClearAllPoints()
text:SetPoint("TOP", -12, -19.5)

Along with finding out which region the texture is.

10leej 04-26-13 03:04 PM

You know what, that could explain why I wasn't finding it... Now just to figure out how to go about hiding it...

Phanx 04-26-13 06:43 PM

Haste's loot addon Butsu has no issues hiding the Blizzard loot frame, if you want a working example to look at.

10leej 04-26-13 07:29 PM

A working example is always better than nothing :)

of course looks like haste actually makes his own frame as he kills the default frame with a simple

Code:

-- Kill the default loot frame.
LootFrame:UnregisterAllEvents()

So that leaves me with the only other loot frame addo I can think of being LovelyLoot, but that uses Ace libraries (which I've honestly avoided) so not sure how Seerah even goes about hiding the default frame art there.
So I might resign myself to making my own frame for it and killing off the default frame like haste did. Of which would mean I probably should scrap !BeautyLoot entirely is I do that.

Seerah 04-26-13 07:58 PM

It only uses AceConfig.

10leej 04-26-13 08:30 PM

Quote:

Originally Posted by Seerah (Post 277112)
It only uses AceConfig.

Ah didn't realize that. (honestly never looked at an ace library before)

Seerah 04-26-13 10:05 PM

Even if it used the whole Ace suite, that still wouldn't change what the frames are called and how you hide them. :p

Haleth 04-27-13 03:25 AM

It's very simply to find out which textures to hide. Just look for the frame in the Blizzard FrameXML (like I linked before), find which frames it inherits from (if any) and just look at every Texture element. If the texture has a parentKey attribute then you can refer to it using frame.parentKey. If it has a name, you can use that, else you'll have to count which texture it is so you can hide it using select(i, GetRegions()):Hide().


All times are GMT -6. The time now is 07:39 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI