Thread: Keybinding
View Single Post
04/21/22, 09:59 AM   #8
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,011
Try to call the function EndLooting(), this is what the vanilla game code does.
here is the vanilla code doing this:
https://github.com/esoui/esoui/blob/..._shared.lua#L8

Else try LOOT_SHARED:Hide()
here is the vanilla code doing this:
https://github.com/esoui/esoui/blob/...shared.lua#L48

But important, there is a comment: CloseLootWindow() -- Called when C++ is telling us to close the window. Don't call CloseLoot.
So normally this function will be called from non lua c++code and you shold not fiddle around it.

And the hide function's code:
https://github.com/esoui/esoui/blob/...shared.lua#L77

If you wonder why there always is used ZO_Loot_Shared: and I told you to use LOOT_SHARED:
Same as with the keybind.
ZO_Loot_Shared is the "class" and LOOT_SHARED is the object created via function :New to this class:
https://github.com/esoui/esoui/blob/...hared.lua#L199

Last edited by Baertram : 04/21/22 at 10:01 AM.
  Reply With Quote