3 local CTimerAfter = C_Timer.After;
5 local updating = false;
6 local frame = CreateFrame("Frame", "OmaCoords", UIParent);
7 frame:SetPoint("CENTER", UIParent, "CENTER", 0, 60);
10 frame.text = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlight");
11 frame.text:SetPoint("CENTER");
14 local function update()
16 local vec = C_Map.GetPlayerMapPosition(C_Map.GetBestMapForUnit("player"), "player");
18 local x, y = vec:GetXY();
19 frame.text:SetFormattedText("%.1f, %.1f", x*100, y*100);
21 frame.text:SetFormattedText("not available");
23 CTimerAfter(0.2, update);
27 SLASH_OMACOORDS1 = "/coords";
28 function SlashCmdList.OMACOORDS()
29 if frame:IsShown() then