Contextual Actions On Item Slots
1 Attachment(s)
Now that game pad support is out, I want to see if we can find a better way of adding actions to context menus.
Currently, we prehook ZO_InventorySlot_ShowContextMenu and shove our code in right before the menu is shown. The game manages contextual actions in itemslot.lua, but there is no global object to work with and both the table of action handlers and the table of actions available to each slot type are local. I've built up a preliminary library to manage the manipulation of these tables, but it unfortunately requires a pretty ham-fisted copy/paste of much of the code in itemslot.lua since there are so many local functions used to support the handlers in the actions table. The benefit of going about managing contextual actions with this library would be:
The drawback is obviously the rather large size (89 KB) due to the file containing the ported itemslot.lua code, but I may be able to slim that down further. (When I was originally building it, I broke mouse interactions with item slots like double click and dragging) So, what do you all think? Am I over-engineering here? Can anyone think of any other potential benefits to build in that would offset the cost? Do you anticipate any problems with the current implementation? |
I'm not pretty sure what the difference in context menus, between mouse/keyboard and gamepad controllers, is at the moment?
I know the m/k way but what does the controller support? Is there any "keybind" to activate the context menu (like rpessing the right mouse button)? Or aren't there any context menus, just keybinds to start the action with an item? |
Quote:
|
Quote:
Lua Code:
Lua Code:
|
Quote:
I'll look at this stuff on Monday. I'm out for the weekend. |
Quote:
|
Quote:
|
All times are GMT -6. The time now is 09:59 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI