/branches/AlphaMapBeta/AlphaMap_POI_FlightMasters
for _, poi in ipairs(AM_FLIGHTMASTER_LOCS[m]) do |
if ( ( not poi.floor ) or ( poi.floor == lFloor ) ) then |
i = i + 1; |
note = getglobal("AM_POI_Note_"..i); |
note = getglobal("AM_POIF_Note_"..i); |
if ( not note ) then |
note = CreateFrame("Button", "AM_POI_Note_"..i, frame, "AM_GenPOI_Template"); |
note = CreateFrame("Button", "AM_POIF_Note_"..i, frame, "AM_GenPOI_Template"); |
note:SetScript("OnEnter", function(self) |
local x, y = GetCursorPosition(); |
if ( x > 500 ) then |
end) |
note:SetScript("OnClick", function(self, mouseButton) |
if ( mouseButton == "LeftButton" ) then |
local map = AML.AlphaMap_GetMap(self.toMap); |
local map = AMap.AlphaMap_GetMap(self.toMap); |
if ( map ) then |
AlphaMapFrame_Update( map ); |
elseif ( self.toWorldMap ) then |
local cont, zone = AML.AlphaMap_GetWorldMap(self.toWorldMap); |
local cont, zone = AMap.AlphaMap_GetWorldMap(self.toWorldMap); |
if ( cont ~= "error" ) then |
SetMapZoom(cont, zone); -- ))(( |
AM_WorldMapSelected = true; |
end |
end) |
end |
noteT = getglobal("AM_POI_Note_"..i.."Texture"); |
noteT = getglobal("AM_POIF_Note_"..i.."Texture"); |
noteT:SetTexture( poi.icon ); |
x = ( poi.x * width ) / amUnitScale; |
end |
i = i + 1; |
note = getglobal("AM_POI_Note_"..i); |
note = getglobal("AM_POIF_Note_"..i); |
while (note) do |
note:Hide(); |
i = i + 1; |
note = getglobal("AM_POI_Note_"..i); |
note = getglobal("AM_POIF_Note_"..i); |
end |
end |
-- Insert FlightMaster Display function code in to the main AlphaMap POI Plugin array |
-- AlphaMap will loop through these functions to display the required POIs |
table.insert(AML.CustomPOIs, DisplayFlightMasterLocs); |
table.insert(AMap.CustomPOIs, DisplayFlightMasterLocs); |
-- Set up the Control Check Button allowing people to toggle |
-- display of FlightMaster Locations off and on from the AlphaMap |
local i = #(AML.CustomPOIControls) + 1; |
local i = #(AMap.CustomPOIControls) + 1; |
local controlButton = CreateFrame("Button", "AM_POIC"..i, UIParent, "AM_GenPOIControl_Template"); |
controlButton.id = i; |
local controlButtonT = getglobal("AM_POIC"..i.."Texture"); |
-- Insert the Created control button in to the main AlphaMap array |
-- for display when the Control & Alt keys are pressed together |
table.insert(AML.CustomPOIControls, controlButton); |
table.insert(AMap.CustomPOIControls, controlButton); |
end |