• 0

    posted a message on Put an icon on a WorldMap

    Hi i am new in this forum and this is my first question.

     

    I am coding my first AddOn and i want to place an icon on the WorldMap of Oribos.

    I tried to get the mapID and create an frame on it which displays the icon but it gives me Lua errors

     

    local frame = WorldMapFrame:GetMapID(1670)
    local pin = CreateFrame("Frame", nil, frame)
    
    pin:SetWidth(16)
    pin:SetHeight(16)
    pin:EnableMouse(true)
    
    pin: SetScript("OnEnter", function(pin) self:ShowTooltip(pin)end)
    pin: SetScript("Onleave", function() self:HideTooltip() end)
    
    pin.texture:SetTexture("INTERFACE\\MINIMAP\\ObjectIcons.blp")
    pin.texture:SetTexture(0.125, 0.250, 0.125, 0.250)
    pin.texture:SetAllPoints()
    
    pin:Show()
    
    this is my code.
    Posted in: Map/Minimap AddOns
  • To post a comment, please or register a new account.