local function guiExport()
-- Define a new menu element function
local function myCustomMenuElement()
if ImGui.BeginMenu('My Custom Menu') then
-- Add menu items here
_, guiLoot.console.autoScroll = ImGui.MenuItem('Auto-scroll', nil, guiLoot.console.autoScroll)
local activated = false
activated, guiLoot.hideNames = ImGui.MenuItem('Hide Names', activated, guiLoot.hideNames)
if activated then
if guiLoot.hideNames then
guiLoot.console:AppendText("\ay[Looted]\ax Hiding Names\ax")
else
guiLoot.console:AppendText("\ay[Looted]\ax Showing Names\ax")
end
end
local act = false
act, guiLoot.showLinks = ImGui.MenuItem('Show Links', act, guiLoot.showLinks)
if act then
guiLoot.linkdb = mq.TLO.Plugin('mq2linkdb').IsLoaded()
if guiLoot.showLinks then
if not guiLoot.linkdb then guiLoot.loadLDB() end
guiLoot.console:AppendText("\ay[Looted]\ax Link Lookup Enabled\ax")
else
guiLoot.console:AppendText("\ay[Looted]\ax Link Lookup Disabled\ax")
end
end
ImGui.EndMenu()
end
end
-- Add the custom menu element function to the importGUIElements table
table.insert(guiLoot.importGUIElements, myCustomMenuElement)
end