• 0

    posted a message on Can the Guild Frame hooked with AceHook-3.0

    Hi all,

     

    finally I'm able to answer my own question. Yes, the GuildFrame can be hooked! 

     

    To get access to the GuildFrame you need to add following lines into your addons .toc file. 

    ## LoadWith: Blizzard_GuildUI

    ## Dependencies: Blizzard_GuildUI


    Then you can do following in your addon (with AceHook)

     

    function myAddon:OnInitialize()
      self:HookScript(GuildTextEditFrame, "OnShow", "GuildFrameOnShow") 
      self:HookScript(GuildTextEditFrameAcceptButton, "OnClick", "GuildFrameBtnClick")
    end
    
    function myAddon:GuildFrameOnShow(frame)
      self:Print("The GuildFrame is shown!")
    end
    
    function myAddon:GuildFrameBtnClick()
      self:Printf("GuildFrame Button clicked! (%s)", GuildTextEditFrame.type)
    end
    

    BTW: the GuildTextEditFrame.type is a string containing either "motd" or "info" depending which text has been changed.

     

    Hope someone may find this helpful

    Posted in: Lua Code Discussion
  • 0

    posted a message on Can the Guild Frame hooked with AceHook-3.0

    HI all, 

     

    I have not programmed an addon yet, so just reading through the documentations (website, forums)  and trying things out, to get familiar with all the stuff.

     

    I played around with the AceHook-3.0 example  https://www.wowace.com/projects/ace3/pages/api/ace-hook-3-0 and just wondering which frames can be hooked and which can't.

     

    For example what's about the GuildUI, can this UI be hooked? 

    Does anyone have an example how the GuidUI can be hook using AceHook, or know if this is possible?

     

    Thanks in advance.

     

    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.