Thank you for you replies!
Originally Posted by votan
Add the inventory fragment to the base scene at startup (built-in code will initialize it immediately)
And remove the fragment on EVENT_PLAYER_ACTIVATED. And beware, it could cause side-effects with other addons not expecting this to happen that early.
|
I've tried to do it, but nothing works
Digging basic esoui code deeper, gave me this:
https://github.com/esoui/esoui/blob/...entory.lua#L64
OnDeferredInitialize called when scene changes state to SCENE_SHOWING first time.
And, it's a hardcoded scene here:
https://github.com/esoui/esoui/blob/...entory.lua#L27
And callback registration happens here:
https://github.com/esoui/esoui/blob/...creen.lua#L227
As i can see, i can't override anything on this path, to force deferred initialization complete in secure way.
Originally Posted by Baertram
Try CallSecureProtected as wrapper around UseItem.
|
Simple wrapper works fine for this case:
Lua Code:
function UseItem(bag, index)
CallSecureProtected("UseItem", bag, index)
end
But the solution seems dirty, and, still all interface accessed from main menu becomes tainted because of deferred initialization (ZO_Gamepad_ParametricList_Screen is basic class for almost all gamepad interface accessible from main menu).
And there potentially can be private functions, that couldn't be overrided that easily.
Also, it's too hard to find all functions i should override.
But looks like it's my only option.