Originally Posted by GRascm
To show the inventory menu, i use simple code:
Lua Code:
SCENE_MANAGER:Show(menuEntryData.scene)
And the main problem is, that if i hit an "I" button to open inventory first, and than try to open it from my menu (pressing "start" on gamepad), everything works perfectly fine.
|
If the inventory scene gets initialized from custom code(=addon) everything is tainted. (insecure)
The build-in code is not written to take care of CallSecureProtected, because it normally doesn't need to.
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.