/
## Title: PocketPlot |
## Author: Seerah |
## Notes: Minimap customization |
## Version: 2.9 |
## Version: 2.9.1 |
## X-Category: Minimap |
## OptionalDeps: Ace3, LibSharedMedia-3.0 |
## SavedVariables: PocketPlotDB |
GameTimeFrame:SetAlpha(0) --calendar button (old day/night indicator) --Set alpha to 0 so that it's still hidden, but we'll see the ? flash for new invites |
GameTimeFrame:EnableMouse(false) --so that we don't get the tooltip/click behavior still |
GameTimeCalendarInvitesTexture:SetParent("Minimap") --the ? texture |
Minimap:SetScript("OnMouseDown", function(_,click) |
if click == "RightButton" then |
if not CalendarFrame then |
LoadAddOn("Blizzard_Calendar") |
--right click to open the calendar (but do it without pinging the map) |
local oldOnClick = Minimap:GetScript("OnMouseUp") |
Minimap:SetScript("OnMouseUp", function(self, click) |
if click == "RightButton" then |
if not CalendarFrame then |
LoadAddOn("Blizzard_Calendar") |
end |
if CalendarFrame:IsShown() then |
CalendarFrame:Hide() |
else |
CalendarFrame:Show() |
end |
return |
end |
CalendarFrame:Show() |
end |
end) |
oldOnClick(self) |
end) |
--TRACKING ICON/MENU |
MiniMapTrackingButton:SetAlpha(0) |
coordframe:SetScript("OnEnter", function(self) |
GameTooltip:SetOwner(self, "ANCHOR_LEFT") |
GameTooltip:AddLine("Click to display the world map.") |
GameTooltip:AddLine("Shift-click to input your coordinates into chat.") |
GameTooltip:Show() |
end) |
coordframe:SetScript("OnLeave", function() GameTooltip:Hide() end) |
coordframe:SetScript("OnMouseUp", function() WorldMapFrame:Show() end) |
coordframe:SetScript("OnMouseUp", function() |
if IsShiftKeyDown() then |
ChatFrameEditBox:Insert("["..coords:GetText().."]") |
elseif WorldMapFrame:IsShown() then |
WorldMapFrame:Hide() |
else |
WorldMapFrame:Show() |
end |
end) |
coordframe:SetScript("OnUpdate", function() |
local coordx,coordy = GetPlayerMapPosition("player") |
coords:SetFormattedText("%.1f/%.1f", coordx*100, coordy*100) |