SYNQ UI

Minimap Button

Create interactive minimap buttons with tooltips and click handlers

Draggable minimap button with tooltip, click handlers, and position persistence.

Basic Usage

ui:MinimapButton({
  icon         = "Interface\\Icons\\Ability_warrior_charge",
  tooltip      = "My Routine",
  angle        = 220,
  onClick      = function(button, ui) ui.frame:Toggle() end,
  onRightClick = function(button, ui)
    synq.enabled = not synq.enabled
  end,
})

Options

OptionTypeDefaultDescription
iconstringQuestion mark iconTexture path
tooltipstring | function(GameTooltip)UI titleHover tooltip
anglenumber220Initial position (degrees)
onClickfunction(button, ui)Toggle UI frameLeft-click handler
onRightClickfunction(button, ui)noneRight-click handler

Default left-click toggles ui.frame. Position auto-saves and is drag-to-reposition. Combat-safe on all unlockers.

Rich Tooltip

Pass a function to tooltip for dynamic, multi-line tooltip content:

ui:MinimapButton({
  icon = "Interface\\Icons\\Spell_shadow_shadowbolt",
  tooltip = function(tip)
    tip:AddLine("|cFFFFD700My Routine|r")
    tip:AddLine("Left-click: Settings")
    tip:AddLine(synq.enabled and "|cFF00FF00Enabled|r" or "|cFFFF0000Disabled|r")
  end,
})

Accessing the Button

Access the button frame directly via ui.minimapButton after creation.


Next: See a complete Getting Started Example putting it all together.