Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Создание фрейма, который будет содержать текстуру иконки
- iconFrame1 = CreateFrame("FRAME", "myAddonIconFrame", WorldMapFrame)
- iconFrame1:SetSize(12, 12)
- iconFrame1.iconTexture = iconTexture1
- iconFrame1:SetScript("OnMouseUp", function() print("Clicked on myAddon icon!") end)
- -- Создание текстуры иконки
- iconTexture1 = iconFrame:CreateTexture("myAddonIcon", "OVERLAY")
- iconTexture1:SetTexture("Interface\\Icons\\INV_Misc_QuestionMark")
- iconTexture1:SetSize(12, 12)
- iconTexture1:SetPoint("CENTER", 110, 110)
- -- Установка позиции фрейма на карте/миникарте
- iconFrame1:SetHeight(12)
- iconFrame1:SetWidth(12)
- -- Показ фрейма на карте/миникарте
- iconFrame1:Show()
- --]]
- iconRis={}
- iconRisText={}
- function iconRis:configure(id,razmerX,razmerY,iconText)
- self[id] = CreateFrame("FRAME", "myAddonIconFrame", WorldMapFrame)
- self[id]:SetSize(razmerX, razmerY)
- self[id].iconTexture = iconText
- self[id]:SetScript("OnMouseUp", function() print("Clicked on myAddon icon!") end)
- self[id]:Show()
- end
- function iconRisText:configure(id,razmerX,razmerY,X,Y)
- self[id] = iconRis[id]:CreateTexture("myAddonIcon", "OVERLAY")
- self[id]:SetTexture("Interface\\Icons\\INV_Misc_QuestionMark")
- self[id]:SetSize(razmerX, razmerY)
- self[id]:SetPoint("CENTER", X, Y)
- self[id]:SetHeight(razmerX)
- self[id]:SetWidth(razmerY)
- end
- iconRis:configure(1,24,24,iconRisText[1])
- iconRisText:configure(1,24,24,111,111)
- iconRis[1]:Show()
- iconRisText[1]:Show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement