function MobileMinimapButtons_AddButton(frameName, localizedFrameName) MOBILE_MINIMAP_BUTTONS_DESCRIPTIONS[buttonName] = buttonDescription; local frame = Sea.util.getValue(frameName); --Store the current position as the reset coords MobileMinimapButtons_StoreResetPosition(frameName); --Load Frame Script Element Hooks Sea.util.hook( frameName, "MobileMinimapButtons_Master_OnEvent", "replace", "OnEvent" ); if (frameName ~= "MiniMapMailFrame") and (frameName ~= "MiniMapTrackingFrame") then Sea.util.hook( frameName, "MobileMinimapButtons_Master_OnClick", "replace", "OnClick" ); end Sea.util.hook( frameName, "MobileMinimapButtons_Master_OnMouseDown", "replace", "OnMouseDown" ); Sea.util.hook( frameName, "MobileMinimapButtons_Master_OnMouseUp", "replace", "OnMouseUp" ); Sea.util.hook( frameName, "MobileMinimapButtons_Master_OnHide", "replace", "OnHide" ); Sea.util.hook( frameName, "MobileMinimapButtons_Master_OnUpdate", "replace", "OnUpdate" ); --Make sure all the Buttons are Mobile if (not frame:IsMovable()) then frame:SetMovable(1); end --Reposition Buttons to Saved Coords local coords = MobileMinimapButtons_Coords[frameName]; if (coords) and (coords.x) and (coords.y) then frame:ClearAllPoints(); frame:SetPoint("CENTER", "Minimap", "CENTER", coords.x, coords.y); end --Elevate Buttons Above the MiniMap frame:SetFrameLevel(frame:GetFrameLevel()+1); end