local db, bg |
--local uief = UIErrorsFrame |
|
local function MoveUIEF(anchor, x, y) |
UIErrorsFrame:ClearAllPoints() |
UIErrorsFrame:SetPoint(anchor, tonumber(x), tonumber(y)) |
end |
|
local function SlashHandler(args) |
if args ~= "" then |
local a, x, y = strsplit(" ", args, 3) |
MoveUIEF(a, x, y) |
db = {["anchor"] = a, ["x"] = x, ["y"] = y} |
else |
if not bg then |
bg = UIErrorsFrame:CreateTexture() |
bg:SetAllPoints() |
bg:SetTexture(0,0,0,.3) |
bg:Hide() |
end |
if bg:IsShown() then |
bg:Hide() |
else |
bg:Show() |
end |
end |
end |
|
local f = CreateFrame("Frame") |
local function SetupAndRestore() |
db = MOEDB or {} |
MoveUIEF(db.anchor, db.x, db.y) |
|
SlashCmdList["MOVEOVERERRORS"] = SlashHandler |
SLASH_MOVEOVERERRORS1 = "/moveovererrors" |
SLASH_MOVEOVERERRORS2 = "/moe" |
|
f:UnregisterEvent("PLAYER_LOGIN") |
SetupAndRestore = nil |
end |
|
f:RegisterEvent("PLAYER_LOGIN") |
f:SetScript("OnEvent", SetupAndRestore) |