ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   Event layer pushed (https://www.esoui.com/forums/showthread.php?t=4805)

Argusus 06/16/15 09:37 AM

Event layer pushed
 
How do I detect what type of layer was pushed to the UI? Do I use SI_GAMECAMERAACTIONTYPE? I'd like to detect when I approach an npc and have the ability to interact with it.

XanDDemoX 06/16/15 09:43 AM

Quote:

Originally Posted by Argusus (Post 21610)
How do I detect what type of layer was pushed to the UI? Do I use SI_GAMECAMERAACTIONTYPE? I'd like to detect when I approach an npc and have the ability to interact with it.

I think this might be what your looking for :)

Code:


local orig_interact = ZO_ReticleContainerInteract:GetHandler("OnShow")

local interact_handler = function(...)

    if orig_interact ~= nil then
      orig_interact (...)
    end

end

ZO_ReticleContainerInteract:SetHandler("OnShow",interact_handler)


Argusus 06/16/15 09:47 AM

Awesome thanks! Where do I detect the type of interaction this is? Such as if it's a harvest vs a lock pick event?

XanDDemoX 06/16/15 10:34 AM

Quote:

Originally Posted by Argusus (Post 21612)
Awesome thanks! Where do I detect the type of interaction this is? Such as if it's a harvest vs a lock pick event?

Have a look at Craft Auto Loot :)

Argusus 06/16/15 11:12 AM

Quote:

Originally Posted by XanDDemoX (Post 21613)
Have a look at Craft Auto Loot :)

Thanks, I'll have a look!


All times are GMT -6. The time now is 11:47 PM.

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