Thread Tools Display Modes
07/09/15, 11:20 AM   #61
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Originally Posted by circonian View Post
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...

Last edited by merlight : 07/09/15 at 05:48 PM.
  Reply With Quote
07/09/15, 02:06 PM   #62
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by merlight View Post
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?
  Reply With Quote
07/09/15, 04:10 PM   #63
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
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.
  Reply With Quote
07/09/15, 05:32 PM   #64
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
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
  Reply With Quote
07/10/15, 04:09 AM   #65
QuadroTony
Banned
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 828
Originally Posted by votan View Post

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
  Reply With Quote
07/10/15, 01:47 PM   #66
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
Nested menus rule. Love it already

  Reply With Quote
07/11/15, 11:06 AM   #67
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Hi guys,

I released LibCustomMenu v2.0.
Big thank to everybody
  Reply With Quote
08/17/15, 06:14 AM   #68
QuadroTony
Banned
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 828
hmmmm

new for me



when alt+enter game window from fullscreen to windowed mode
  Reply With Quote
08/17/15, 06:49 AM   #69
QuadroTony
Banned
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 828
and this one on the PTS while buying DLc in the crown store

looks like ZOs issue too

  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » which addon caused this error?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off