tdBag2

tdBag2

67.5k Downloads

API

Michigras opened this issue ยท 1 comments

commented

Is there any function/frame I can hook to get noticed when the addon's bag frame is opened? The frame seems not to be named. Currently I check for tdBag2MoneyFrame1 to be shown but it is a bit hacky to do so since the frame is nil until the inventory has been opened for the first time.
So I check for the presence of tdBag2MoneyFrame1 via onUpdate.

commented

Maybe you can hook like this:

    local Frame = tdBag2:GetClass('UI.Frame')
    local orig_Constructor = Frame.Constructor

    function Frame:Constructor(...)
        orig_Constructor(self, ...)

        print(self)
    end