View Single Post
04-11-20, 06:35 PM   #1
Shokarta
A Deviate Faerie Dragon
Join Date: Jan 2008
Posts: 11
Multiple images in frame

Hello guys,

from little experiences I have build this:
Code:
MapQuestIconFrame = CreateFrame("Button", "TextureBasics")
local function MapQuestIconShow()
	MapQuestIconFrame:SetFrameStrata("Tooltip")
	MapQuestIconFrame:SetFrameLevel(0)
	MapQuestIconFrame:SetWidth(WorldMapDetailFrame:GetWidth() * WorldMapDetailFrame:GetEffectiveScale())
	MapQuestIconFrame:SetHeight(WorldMapDetailFrame:GetHeight() * WorldMapDetailFrame:GetEffectiveScale())
	MapQuestIconFrame:SetAlpha(1)
	MapQuestIconFrame:SetPoint("TOPLEFT", WorldMapDetailFrame, "TOPLEFT")

	local QuestIcon1 = MapQuestIconFrame:CreateTexture("Texture", "Background")
	QuestIcon1:SetTexture("Interface\\AddOns\\MapTest\\AvailableQuestIcon.blp")
	QuestIcon1:SetDrawLayer("Background", 0)
	QuestIcon1:SetAllPoints(MapQuestIconFrame)

	MapQuestIconFrame:Show()
end

WorldMapFrame:SetScript("OnShow",
	function(self)
		-- Map Opened
		MapQuestIconShow()
	end
)

WorldMapFrame:SetScript("OnHide",
	function(self)
		-- Map Closed
		MapQuestIconFrame:Hide()
	end
)

WorldMapFrame:SetScript("OnSizeChanged",
	function(self)
		-- Map Resized
	end
)
which when open worldmap creates frame but sets only one image as texture inside the frame.
And Im looking for a way to place multiple images inside this frame based on coordinates.

can you guide me how?

Thank you
  Reply With Quote