View Single Post
04/21/15, 01:47 AM   #3
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by sirinsidiator View Post
We could create a library that does exactly the same thing as the ingame menu and use that instead
That is "Plan B". Because we need to use templates. And templates require XML. And XML can not be used from embedded libs.
Therefore I hoped ZOS would respond to this post.

A library needs cooperation from addon developers. It's worthless to write a lib, if everybody says "My code is working without". And basically that is true, because it's just the build-in code that does not work anymore

The main key to avoid this error is:
Never create an instance of ZO_MenuItem from addon code
=> Never use ZO_Menu.itemPool, so that build-in code does not re-use pooled controls created by addon code
=> Never use AddMenuItem

A library could introduce "AddCustomMenuItem", which uses its own pool using a template that mimics ZO_MenuItem.
(The ZO_Menu.checkBoxPool respectively)

But as far as I know, this must be a shared addon. Maybe a more experienced author finds a better solution?

Last edited by votan : 04/21/15 at 03:17 AM.
  Reply With Quote