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 map = C_Map.GetBestMapForUnit("player");
18 local vec = C_Map.GetPlayerMapPosition(map, "player");
20 local x, y = vec:GetXY();
21 frame.text:SetFormattedText("%.1f, %.1f", x*100, y*100);
23 frame.text:SetFormattedText("not available");
26 frame.text:SetFormattedText("not available");
28 CTimerAfter(0.2, update);
32 SLASH_OMACOORDS1 = "/coords";
33 function SlashCmdList.OMACOORDS()
34 if frame:IsShown() then