WoWInterface SVN MoveOverErrors

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 3 to Rev 4
    Reverse comparison

Rev 3 → Rev 4

MoveOverErrors/moe.lua
1,29 → 1,77
local db, bg
--local uief = UIErrorsFrame
local db
local frames = {UIErrorsFrame, RaidWarningFrame, RaidBossEmoteFrame}
local UIErrorsFrame, RaidWarningFrame, RaidBossEmoteFrame = UIErrorsFrame, RaidWarningFrame, RaidBossEmoteFrame
local RN_AM = RaidNotice_AddMessage
 
local function MoveUIEF(anchor, x, y)
if anchor then
UIErrorsFrame:ClearAllPoints()
UIErrorsFrame:SetPoint(anchor, tonumber(x), tonumber(y))
UIErrorsFrame:SetPoint(anchor, x, y)
end
end
 
local function NEW_RN_AM(frame, ...)
if frame == RaidBossEmoteFrame then
return RN_AM(RaidWarningFrame, ...)
else
return RN_AM(frame, ...)
end
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}
local a, x, y = strsplit(" ", strupper(args), 3)
x, y = tonumber(x), tonumber(y)
if a == "CONDENSE" then
db.condense = not db.condense
RaidNotice_AddMessage = db.condense and NEW_RN_AM or RN_AM
if UIErrorsFrame.bg and UIErrorsFrame.bg:IsShown() then
RaidNotice_Clear(RaidWarningFrame)
RaidNotice_Clear(RaidBossEmoteFrame)
RaidNotice_AddMessage(RaidWarningFrame, "This is a TEST of Raid Warnings!", ChatTypeInfo["RAID_WARNING"], 500)
RaidNotice_AddMessage(RaidBossEmoteFrame, "Raid Boss Emotes now shown here!", ChatTypeInfo["RAID_BOSS_EMOTE"], 500)
end
print("|cffff9000MoveOverErrors:|r Boss emotes are "..((db.condense and "now") or "no longer").." condensed with raid warnings.")
elseif x and y then
MoveUIEF(a, x, y)
db.anchor, db.x, db.y = a, x, y
else
print("|cffff9000MoveOverErrors:|r Slash-command help")
print([[ - type "/moe condense" to toggle moving messages from the RaidBossEmoteFrame into the RaidWarningFrame.]])
print([[ - type "/moe anchor x y" to move the UIErrorsFrame (and those attached to it). anchor may be "BOTTOM", "TOP", "CENTER", "RIGHT", "LEFT", "TOPRIGHT", etc. x and y are horizontal and vertical offsets (+/- numbers).]])
end
else
if not bg then
bg = UIErrorsFrame:CreateTexture()
bg:SetAllPoints()
bg:SetTexture(0,0,0,.3)
bg:Hide()
local bg
if not UIErrorsFrame.bg then
for i=1,3 do
bg = frames[i]:CreateTexture()
frames[i].bg = bg
bg:SetAllPoints()
bg:SetTexture(i==1 and 1 or 0, i==2 and 1 or 0, i==3 and 1 or 0, .4)
bg:Hide()
end
local bgText = UIErrorsFrame:CreateFontString(nil, nil, "GameFontHighlightLarge")
UIErrorsFrame.bgText = bgText
bgText:SetPoint("CENTER")
bgText:SetText("UI messages and quest text")
bgText:Hide()
end
if bg:IsShown() then
bg:Hide()
if UIErrorsFrame.bg:IsShown() then
for i=1,3 do
frames[i].bg:Hide()
end
RaidNotice_Clear(RaidWarningFrame)
RaidNotice_Clear(RaidBossEmoteFrame)
UIErrorsFrame.bgText:Hide()
else
bg:Show()
RaidNotice_AddMessage(RaidWarningFrame, "This is a TEST of Raid Warnings!", ChatTypeInfo["RAID_WARNING"], 500)
RaidNotice_AddMessage(RaidBossEmoteFrame, "This is a TEST of Raid Boss Emotes!", ChatTypeInfo["RAID_BOSS_EMOTE"], 500)
--UIErrorsFrame:AddMessage("UI messages and quest text")
--UIErrorsFrame:AddMessage("UIErrorsFrame")
for i=1,3 do
frames[i].bg:Show()
end
UIErrorsFrame.bgText:Show()
end
end
end
32,6 → 80,7
local function SetupAndRestore()
db = MOEDB or {}
MoveUIEF(db.anchor, db.x, db.y)
RaidNotice_AddMessage = db.condense and NEW_RN_AM or RN_AM
 
SlashCmdList["MOVEOVERERRORS"] = SlashHandler
SLASH_MOVEOVERERRORS1 = "/moveovererrors"
MoveOverErrors/MoveOverErrors.toc
1,8 → 1,8
## Interface: 40200
## Interface: 40300
## Title: MoveOverErrors
## Author: Seerah
## Notes: Move the UIErrorsFrame
## Version: 1.0.1
## Version: 1.1
## SavedVariables: MOEDB
 
moe.lua
\ No newline at end of file