local descriptor = "Your addon name"
local callbackFnc = function(buttonData)
--What should happen if you press the button? Example: Show/Hide SuperStar window
end
-- Add to main menu
local categoryLayoutInfo =
{
--Binding must be registered like normal with function ZO_CreateStringId("SI_BINDING_NAME_YOURADDON_MAIN_MENU_BUTTON", "Hide/Show Superstar")
binding = "YOURADDON_MAIN_MENU_BUTTON",
categoryName = SI_BINDING_NAME_YOURADDON_MAIN_MENU_BUTTON,
callback = callbackFnc,
visible = function(buttonData)
--Assumed that a setting is handling the visibility of the button at the main menu
retun settings.showMainMenuButton
end,
--Specify your used graphics for the button here
normal = "esoui/art/..._up.dds",
pressed = "esoui/art/..._down.dds",
highlight = "esoui/art/..._over.dds",
disabled = "esoui/art/..._disabled.dds",
}
LMM2:AddMenuItem(descriptor, categoryLayoutInfo)