Go to Page... |
Compatibility: | Gold Road (10.0.0) Scions of Ithelia (9.3.0) |
Updated: | 05/19/24 07:17 AM |
Created: | 07/11/15 10:51 AM |
Monthly downloads: | 26,941 |
Total downloads: | 4,638,746 |
Favorites: | 2,034 |
MD5: |
local entries = { { label = "Test 1", callback = function() d("Test 1") end, }, { label = "Test 2", callback = function() d("Test 2") end, disabled = function(rootMenu, childControl) return true end, } } ClearMenu() AddCustomSubMenuItem("Sub Menu", entries) ShowMenu()
local function GetEntries(rootMenu) d("run") return { { label = function() return GetTimeStamp() end, callback = function() d("Test 1") end, }, { label = "Test 2", callback = function() d("Test 2") end, disabled = function(rootMenu, childControl) return true end, } } end ClearMenu() AddCustomSubMenuItem("Sub Menu", GetEntries) ShowMenu()
local entries = { { label = "Test 1", callback = function() d("Test 1") end, }, { label = "-", }, { label = "Test 2", callback = function() d("Test 2") end, disabled = function(rootMenu, childControl) return true end, } } ClearMenu() AddCustomSubMenuItem("Sub Menu", entries) ShowMenu()
local myState = true local entries = { { label = "Test 1", callback = function(state) myState = state df("Test 1: %s", tostring(myState)) end, checked = function() return myState end, itemType = MENU_ADD_OPTION_CHECKBOX, }, { label = "Test 1b", callback = function() d("Test 1b") end, itemType = MENU_ADD_OPTION_LABEL, }, { label = "-", }, { label = "Test 2", callback = function() d("Test 2") end, disabled = function(rootMenu, childControl) return true end, } } ClearMenu() AddCustomSubMenuItem("Sub Menu", entries) ShowMenu()
local function func(inventorySlot, slotActions) end
local function func() end
ZO_CreateStringId("SI_BINDING_NAME_SHOW_POPUP", "Show in Popup") local function AddItem(inventorySlot, slotActions) local valid = ZO_Inventory_GetBagAndIndex(inventorySlot) if not valid then return end slotActions:AddCustomSlotAction(SI_BINDING_NAME_SHOW_POPUP, function() local bagId, slotIndex = ZO_Inventory_GetBagAndIndex(inventorySlot) local itemLink = GetItemLink(bagId, slotIndex) ZO_PopupTooltip_SetLink(itemLink) end , "") end LibCustomMenu:RegisterContextMenu(AddItem, LibCustomMenu.CATEGORY_PRIMARY)
local function AddItem(inventorySlot, slotActions) local bagId, slotIndex = ZO_Inventory_GetBagAndIndex(inventorySlot) if not CanItemBePlayerLocked(bagId, slotIndex) then return end local locked = IsItemPlayerLocked(bagId, slotIndex) slotActions:AddCustomSlotAction(locked and SI_ITEM_ACTION_UNMARK_AS_LOCKED or SI_ITEM_ACTION_MARK_AS_LOCKED, function() SetItemIsPlayerLocked(bagId, slotIndex, not locked) end, "keybind2") -- you can use: "primary", "secondary", "keybind1", "keybind2" end local menu = LibCustomMenu --menu:RegisterContextMenu(AddItem, menu.CATEGORY_PRIMARY) menu:RegisterKeyStripEnter(AddItem, menu.CATEGORY_LATE)
local function func(control, inside) end
local myState = true local entries = { { label = "Test 1", callback = function(state) myState = state df("Test 1: %s", tostring(myState)) end, checked = function() return myState end, itemType = MENU_ADD_OPTION_CHECKBOX, tooltip = "This is Test 1", }, { label = "Test 1b", callback = function() d("Test 1b") end, itemType = MENU_ADD_OPTION_LABEL, tooltip = "This is Test 2", }, { label = "-", }, { label = "Test 2", callback = function() d("Test 2") end, disabled = function(rootMenu, childControl) return true end, } } ClearMenu() AddCustomSubMenuItem("Sub Menu", entries) AddCustomMenuTooltip("A sub-menu") AddCustomMenuItem("-", function() d("soso") end) AddCustomMenuItem("Button", function() d("jojo") end) AddCustomMenuTooltip(function(control, inside) if inside then d("A great button") end end) AddCustomMenuItem("CheckBox", function() d("soso") end, MENU_ADD_OPTION_CHECKBOX) ShowMenu()
local index = AddCustomMenuItem("CheckBox", function() <your callback> end, MENU_ADD_OPTION_CHECKBOX) if needToCheckIt then ZO_CheckButton_SetChecked(ZO_Menu.items[index].checkbox) end
local function func(inventorySlot, slotActions, ctrl, alt, shift, command) end
local function func(playerName, rawName) end
local function func(rowData) end
local function AddItem(data) AddCustomMenuItem("Example", function() d(data.displayName) end) end local menu = LibCustomMenu menu:RegisterFriendsListContextMenu(AddItem, menu.CATEGORY_EARLY) menu:RegisterFriendsListContextMenu(AddItem, menu.CATEGORY_LAST)
File Name |
Version |
Size |
Uploader |
Date |
7.2.1 |
8kB |
votan |
03/13/23 03:24 PM |
|
7.2.0 |
8kB |
votan |
03/11/23 11:59 AM |
|
7.1.3 |
8kB |
votan |
04/24/22 09:04 AM |
|
7.1.2 |
8kB |
votan |
10/24/21 07:44 AM |
|
7.1.1 |
8kB |
votan |
09/05/21 07:30 AM |
|
7.1.0 |
8kB |
votan |
09/04/21 09:32 AM |
|
7.0.1 |
8kB |
votan |
07/04/21 04:46 AM |
|
7.0.0 |
8kB |
votan |
04/28/21 11:21 AM |
|
6.9.5 |
7kB |
votan |
02/20/21 09:09 AM |
|
6.9.4 |
7kB |
votan |
11/02/20 04:41 AM |
|
6.9.3 |
7kB |
votan |
08/22/20 04:55 AM |
|
6.9.2 |
7kB |
votan |
04/21/20 03:12 PM |
|
6.9.1 |
7kB |
votan |
04/04/20 06:22 AM |
|
6.9.0 |
7kB |
votan |
04/03/20 11:43 AM |
|
6.8.2 |
7kB |
votan |
02/15/20 11:44 AM |
|
6.8.1 |
7kB |
votan |
10/03/19 04:37 AM |
|
6.8.0 |
7kB |
votan |
08/07/19 01:15 PM |
|
6.7.1 |
7kB |
votan |
07/30/19 11:57 AM |
|
6.7.0 |
7kB |
votan |
05/18/19 08:07 AM |
|
6.6.3 |
16kB |
votan |
02/23/19 10:15 AM |
|
6.6.2 |
8kB |
votan |
10/21/18 09:31 AM |
|
6.6.1 |
7kB |
votan |
10/19/18 12:13 PM |
|
6.6 |
14kB |
votan |
08/13/18 11:17 AM |
|
6.5 |
8kB |
votan |
04/22/18 05:21 AM |
|
6.4 |
7kB |
votan |
04/16/18 11:45 AM |
|
6.3 |
7kB |
votan |
03/03/18 10:58 AM |
|
6.2 |
8kB |
votan |
02/02/18 12:35 AM |
|
5 |
7kB |
votan |
01/27/18 03:11 PM |
|
5 |
7kB |
votan |
08/15/17 12:34 PM |
|
4.3 |
6kB |
votan |
07/15/17 01:00 PM |
|
4.2.0 |
6kB |
votan |
10/12/16 12:56 PM |
|
4.1.1 |
6kB |
votan |
03/07/16 12:13 PM |
|
4.1.0 |
6kB |
votan |
11/22/15 02:24 PM |
|
4.0.0 |
6kB |
votan |
08/06/15 10:48 AM |
|
3.0.0 |
6kB |
votan |
07/25/15 05:36 AM |
|
2.0.0 |
5kB |
votan |
07/11/15 10:51 AM |
Comment Options |
votan |
View Public Profile |
Send a private message to votan |
Find More Posts by votan |
Add votan to Your Buddy List |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
Shadowfen |
View Public Profile |
Send a private message to Shadowfen |
Send email to Shadowfen |
Find More Posts by Shadowfen |
Add Shadowfen to Your Buddy List |
05/04/24, 10:06 AM | |
|
Way to unregister?
Is there a way to unregister a custom menu item that I have previously added without disturbing menu entries added by other addons? Preferably without /reloadui?
I would like to be able to disable/enable my addon and have LCM remove/add the one menu item that the addon has. (And in one case I want to allow a settings option of whether or not to display the menu item in the inventory context menu.)
Last edited by Shadowfen : 05/04/24 at 10:08 AM.
|
|
Shadowfen |
View Public Profile |
Send a private message to Shadowfen |
Send email to Shadowfen |
Find More Posts by Shadowfen |
Add Shadowfen to Your Buddy List |
02/02/24, 02:33 PM | |
Forum posts: 0
File comments: 1
Uploads: 0
|
hey i am new to eso pc and kind of new to pc things in general. i love all the adds on and in the last few days my lazy writ crafter has stopped working and i keep getting error codes. i will paste them below. i have been reading some of the above comments, but sadly i dont understand pretty well anything. how can i fix them? and is there a page here somewhere to read and kind of understand what you all i do i find it very intresting and love to learn. thanks in adavance.
Failed to create control 'LibCustomMenuSubmenu'. Duplicate name. stack traceback: [C]: in function 'CreateControl' user:/AddOns/DolgubonsLazySetCrafter/Libs/LibCustomMenu/LibCustomMenu.lua:85: in function 'Submenu:Initialize' <Locals> self = [table:1]{}, name = "LibCustomMenuSubmenu" </Locals> user:/AddOns/DolgubonsLazySetCrafter/Libs/LibCustomMenu/LibCustomMenu.lua:78: in function 'Submenu:New' <Locals> self = [table:2]{__isAbstractClass = F}, object = [table:1] </Locals> user:/AddOns/DolgubonsLazySetCrafter/Libs/LibCustomMenu/LibCustomMenu.lua:628: in function 'OnAddonLoaded' <Locals> event = 65536, name = "LibDebugLogger" </Locals> user:/AddOns/DolgubonsLazySetCrafter/Libs/LibCustomMenu/LibCustomMenu.lua:86: attempt to index a nil value stack traceback: user:/AddOns/DolgubonsLazySetCrafter/Libs/LibCustomMenu/LibCustomMenu.lua:86: in function 'Submenu:Initialize' <Locals> self = [table:1]{}, name = "LibCustomMenuSubmenu" </Locals> user:/AddOns/DolgubonsLazySetCrafter/Libs/LibCustomMenu/LibCustomMenu.lua:78: in function 'Submenu:New' <Locals> self = [table:2]{__isAbstractClass = F}, object = [table:1] </Locals> user:/AddOns/DolgubonsLazySetCrafter/Libs/LibCustomMenu/LibCustomMenu.lua:628: in function 'OnAddonLoaded' <Locals> event = 65536, name = "LibDebugLogger" </Locals> user:/AddOns/DolgubonsLazySetCrafter/SetCrafterUI.lua:358: function expected instead of nil stack traceback: user:/AddOns/DolgubonsLazySetCrafter/SetCrafterUI.lua:358: in function 'makeDropdownSelections' <Locals> comboBoxContainer = ud, tableInfo = [table:1]{}, text = "Armour Trait", x = -160, y = 120, comboBoxLocation = 1, selectionTypes = "armourTrait", isArmourCombobox = T, comboBox = ud </Locals> user:/AddOns/DolgubonsLazySetCrafter/SetCrafterUI.lua:451: in function 'DolgubonSetCrafter.setupComboBoxes' <Locals> UIStrings = [table:2]{armourTrait = "Armour Trait", level = "Level", patternHeader = "Select Pieces", usesMimicStone = "This item will be made using a...", noSet = "No Set", mimicStones = "Use Mimic Stones", CP = "CP", chatRequirements = "Requirements to Chat", addToQueue = "Add to Queue", comboboxDefault = "Unselected", genericTrait = "Trait", notEnoughSpecificMat = "You do not have enough of this...", materialScrollTitle = "Material Requirements", weaponTrait = "Weapon Trait", resetToDefault = "Clear Selections", quality = "Quality", mailRequirements = "Mail Requirements", craftStart = "Start Crafting", defaultUserId = "Enter @UserId", queueHeader = "Crafting Queue", autoCraft = "Auto Craft", comboboxHeader = "Attributes", style = "Style", gearSet = "Set", selectPrompt = "Please select a <<1>>", jewelryTrait = "Jewelry Trait", pattern = "Piece", invalidLevel = "Invalid Level", notEnoughMats = "You do not have enough materia...", notEnoughKnowledge = "You do not have enough knowled...", clearQueue = "Clear Queue", multiplier = "Multiplier"} </Locals> user:/AddOns/DolgubonsLazySetCrafter/SetCrafterUI.lua:966: in function 'DolgubonSetCrafter.initializeFunctions.setupUI' user:/AddOns/DolgubonsLazySetCrafter/SetCrafter.lua:108: in function 'DolgubonSetCrafter:Initialize' <Locals> self = [table:3]{version = 5, name = "DolgubonsLazySetCrafter", lang = "en"} </Locals> user:/AddOns/DolgubonsLazySetCrafter/SetCrafter.lua:129: in function 'DolgubonSetCrafter.OnAddOnLoaded' <Locals> event = 65536, addonName = "DolgubonsLazySetCrafter" </Locals> |
|
woody4853 |
View Public Profile |
Send a private message to woody4853 |
Send email to woody4853 |
Find More Posts by woody4853 |
Add woody4853 to Your Buddy List |
01/01/24, 01:35 PM | |||
Forum posts: 0
File comments: 17
Uploads: 0
|
Last edited by heinrich6745 : 01/01/24 at 01:35 PM.
|
||
|
heinrich6745 |
View Public Profile |
Send a private message to heinrich6745 |
Send email to heinrich6745 |
Find More Posts by heinrich6745 |
Add heinrich6745 to Your Buddy List |
11/03/23, 08:07 AM | |
|
Hi Votan,
if you use checkboxes in a menu the menu height is calculated wrong somehow. The more checkboxes, the heigher the menu frame: Happens without the header entry too: And without the divider: I'll see if I can find the reason and update you with a fix if easily doable. Edit: I've added some code to your already exisitng function cleanupDivider -> renamed to cleanupEntryHeights Lua Code:
Now the entries look like this: -> Main ZO_Menu height is missing a few pixels at the bottom. The selection highlight is above the bottom border... Maybe this is related to a ZOs bug too. Submenus look good but at the main menu ZO_Menu the checkbox entries are kinda wrong height? The row selection highlight e.g. is to high for them: The highlight is above the next entry below, no matter if it's another checkbox, a divider, or the bottom line of the ZO_Menu background Edit2 The rows highlight missplacement seems to origin from function AddCustomMenuItem Code:
local lastAdded = ZO_Menu.items[index] if itemType == MENU_ADD_OPTION_CHECKBOX then lastAdded.item:SetAnchor(TOPLEFT, lastAdded.checkbox, TOPLEFT, 0, -2) --Change to -4, see comment below! end See below: I've also fixed the error at the clickable header -> checkbox "On/Off" is shown, see my post: #170368 Code of my changed LibAddonMenu-lua file: https://www.dropbox.com/scl/fi/3hbabuelcqaskjftavu42/LibCustomMenu.lua?rlkey=aorib4owufbs6qfm49wyw8dng&dl=1
Last edited by Baertram : 11/03/23 at 09:53 AM.
|
|
Baertram |
View Public Profile |
Send a private message to Baertram |
Send email to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
04/17/23, 03:06 AM | ||
|
||
|
votan |
View Public Profile |
Send a private message to votan |
Send email to votan |
Find More Posts by votan |
Add votan to Your Buddy List |
04/16/23, 07:53 PM | |
|
Hey votan,
the header lines are using the virtual template "ZO_AddOnSectionHeaderRow" in their HeaderFactory function. But this xml template uses an ON/OFF checkbox since some patches and if you click the header rows in LibCustomMenu menus it shows an AN/AUS or ON/OFF all of sudden next to the text Here is a fix, in the function SetupHeader determine the Checkbox child and set it hidden + MouseEnabled(false): Lua Code:
|
|
Baertram |
View Public Profile |
Send a private message to Baertram |
Send email to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
03/30/23, 02:10 PM | ||
|
||
|
votan |
View Public Profile |
Send a private message to votan |
Send email to votan |
Find More Posts by votan |
Add votan to Your Buddy List |
03/26/23, 07:18 PM | |
|
Im having a strange issue with my context menu that saves a players @name. I thought It was my fault but I can find nothing wrong and does fix itself if I open the addon settings for it which is extra wierd. After exhausting all my options i started peeking around in libaddonmenu and libcustommenu notes and found your most recent patch apparently adresses the issue that I've just noticed has just started for me. Based on what I can see I might guess the setting panel description field somehow doesn't exist yet to be edited until you open the addon settings. I realize thats likely a me or libaddonmenu issue but throwing it out there incase anything comes to mind.
ERRORS: Code:
user:/AddOns/MyAddon/MyAddon.lua:249: attempt to index a nil value stack traceback: user:/AddOns/MyAddon/MyAddon.lua:249: in function 'MyAddon.SavePlayer' |caaaaaa<Locals> displayName = "@someone" </Locals>|r user:/AddOns/MyAddon/MyAddon.lua:242: in function 'OnSelect' /EsoUI/Libraries/ZO_ContextMenus/ZO_ContextMenus.lua:476: in function 'ZO_Menu_ClickItem' |caaaaaa<Locals> control = ud, button = 1, menuEntry = [table:1]{itemYPad = 0, isDivider = F} </Locals>|r user:/AddOns/LibCustomMenu/LibCustomMenu.lua:604: in function 'MouseUp' initializing the menu stuff with this ON_LOADED: Code:
local category = LibCustomMenu.CATEGORY_LATE--<<< context menu stuff LibCustomMenu:RegisterGuildRosterContextMenu(MyAddon.AddGGFContext, category) LibCustomMenu:RegisterFriendsListContextMenu(MyAddon.AddGGFContext, category) LibCustomMenu:RegisterGroupListContextMenu(MyAddon.AddGGFContext, category) Code:
function MyAddon.AddGGFContext(data) AddCustomMenuItem("Save to MyAddon", function() MyAddon.SavePlayer(data.displayName) end) return end function MyAddon.SavePlayer(displayName) MyAddon.savedVariables.savedPlayer = displayName df("|c6666FF[MyAddon]|r Saving: " .. tostring(displayName)) MyAddon_SETTINGS_SAVEDPLAYER_TEXT.data.text = "Saved Player: " .. tostring(displayName)-- errors on this line 249 MyAddon_SETTINGS_SAVEDPLAYER_TEXT:UpdateValue() return end
Last edited by sinnereso : 03/26/23 at 08:26 PM.
|
|
sinnereso |
View Public Profile |
Send a private message to sinnereso |
Send email to sinnereso |
Find More Posts by sinnereso |
Add sinnereso to Your Buddy List |
03/13/23, 03:42 PM | ||
Re: Error after U37
There is ZOS internal check, which make the second parameter mandantory. That did not work with dividers. Failed to test that. |
||
|
votan |
View Public Profile |
Send a private message to votan |
Send email to votan |
Find More Posts by votan |
Add votan to Your Buddy List |
03/13/23, 07:43 AM | |
Error after U37
Lua Error: user:/AddOns/LibCustomMenu/LibCustomMenu.lua:729: attempt to index a nil value
stack traceback: user:/AddOns/LibCustomMenu/LibCustomMenu.lua:729: in function 'AddCustomMenuItem' <Locals> mytext = "-", orgItemPool = [table:1]{m_NextControlId = 30, m_NextFree = 31}, orgCheckboxItemPool = [table:2]{m_NextControlId = 30, m_NextFree = 31}, isDivider = T </Locals> user:/AddOns/Postmaster/classes/SendMailField.lua:101: in function 'class.SendMailField:OnControlMouseUp' <Locals> self = [table:3]{settingsKeyValues = "sendmailRecipients", name = "PostmasterSendMailField", settingsKeyEnabled = "sendmailSaveRecipients", contextMenuLabel = "Recent Contacts"}, control = ud, mouseButton = 2, upInside = T, altKey = F, shiftKey = F, ctrlKey = F, commandKey = F, savedValues = [table:4]{}, removeEntries = [table:5]{} </Locals> (tail call): ?|r
Last edited by Tiara Ra : 03/13/23 at 07:45 AM.
|
|
|
Tiara Ra |
View Public Profile |
Send a private message to Tiara Ra |
Send email to Tiara Ra |
Find More Posts by Tiara Ra |
Add Tiara Ra to Your Buddy List |
03/11/23, 02:34 PM | |||
|
Re: Re: any plans for friends list and group support?
|
||
|
sinnereso |
View Public Profile |
Send a private message to sinnereso |
Send email to sinnereso |
Find More Posts by sinnereso |
Add sinnereso to Your Buddy List |
03/11/23, 01:42 PM | |||
|
Re: Re: any plans for friends list and group support?
*edit infact all the accessible variables from all of them would be handy to see in the addon info page
Last edited by sinnereso : 03/11/23 at 01:44 PM.
|
||
|
sinnereso |
View Public Profile |
Send a private message to sinnereso |
Send email to sinnereso |
Find More Posts by sinnereso |
Add sinnereso to Your Buddy List |