ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Help/Support (https://www.esoui.com/forums/forumdisplay.php?f=164)
-   -   which addon caused this error? (https://www.esoui.com/forums/showthread.php?t=2109)

merlight 07/09/15 11:20 AM

Quote:

Originally Posted by circonian (Post 21930)
What about just just preventing the problem at the source. Stop using the right click context menu, and instead add an icon/button or something to each row entry that would pop-up our own custom context menu created with a library that could be shared, for use with all addons. Or Instead of adding a new button to the row just use the item icon that is already there as our button. Or just make it a left click context menu.
Either way then all of the code is our own. This would completely work around the secure code problem.

I like your pool hack more ;) This would be adding another UI element, and I can already see myself hovering over an item and thinking: "Is the thing I want to do in the core menu or an add-on?"

The whole menu interface looks very... old... like from before there was a class for ZO_Anything.

How about passing an optional object pool key to AddMenuItem?
Lua Code:
  1. function AddMenuItem(mytext, myfunction, itemType, myfont, normalColor, highlightColor, itemYPad, itemKey)
  2.     local menuItemControl = ZO_Menu.itemPool:AcquireObject(itemKey)

You can use a string key with add-on name + some suffix, AcquireObject will create one object for that key and always return that one. That way you won't "steal" a secure menu item. Don't know if we can hook AddMenuItem and not break everything, in which case this parameter would've to be added by ZOS.

Edit: nevermind, this wouldn't work even if AddMenuItem could be hooked. AcquireObject() without a key would "steal" named ones...

votan 07/09/15 02:06 PM

Quote:

Originally Posted by merlight (Post 21931)
I like your pool hack more ;) This would be adding another UI element, and I can already see myself hovering over an item and thinking: "Is the thing I want to do in the core menu or an add-on?"

The whole menu interface looks very... old... like from before there was a class for ZO_Anything.

How about passing an optional object pool key to AddMenuItem?
Lua Code:
  1. function AddMenuItem(mytext, myfunction, itemType, myfont, normalColor, highlightColor, itemYPad, itemKey)
  2.     local menuItemControl = ZO_Menu.itemPool:AcquireObject(itemKey)

You can use a string key with add-on name + some suffix, AcquireObject will create one object for that key and always return that one. That way you won't "steal" a secure menu item. Don't know if we can hook AddMenuItem and not break everything, in which case this parameter would've to be added by ZOS.

Hehe, thanks. :)

Well, we can not hook AddMenuItem, as it would make all code paths "in-secure". So, build-in menu entries must look as they do now.
I will try some things at weekend.

Back to QuadroTony's error:
Does it happen, if MM is not active, too?

sirinsidiator 07/09/15 04:10 PM

I started to tinker around with LibCustomMenu.

It's showing the submenu, but you can't interact with it yet, because it disappears once the mouse leaves the entry on the main menu.

merlight 07/09/15 05:32 PM

libraries/zo_contextmenus/zo_contextmenus.xml
xml Code:
  1. <!--
  2.    TODO: ZO_Menu needs to become virtual and be reparented to ZO_Menus to enable
  3.    nesting.  This is just a quick first pass.
  4. -->
I wonder if that's still on TODO :D

QuadroTony 07/10/15 04:09 AM

Quote:

Originally Posted by votan (Post 21932)

Back to QuadroTony's error:
Does it happen, if MM is not active, too?

i probably cant test because error persist only till /reloadui
and if i meet it again, and go and turn off MM i will need reloadui after it, error will gone anyway

sirinsidiator 07/10/15 01:47 PM

Nested menus rule. Love it already :)


votan 07/11/15 11:06 AM

Hi guys,

I released LibCustomMenu v2.0.
Big thank to everybody :)

QuadroTony 08/17/15 06:14 AM

hmmmm

new for me



when alt+enter game window from fullscreen to windowed mode

QuadroTony 08/17/15 06:49 AM

and this one on the PTS while buying DLc in the crown store

looks like ZOs issue too



All times are GMT -6. The time now is 03:01 PM.

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