From ba6900bde384832b2961b00104858e685e24ac75 Mon Sep 17 00:00:00 2001 From: Matthew Plachter Date: Fri, 13 Dec 2019 20:37:47 -0500 Subject: [PATCH] added command for daily tracker ui position --- HonorAssist.lua | 6 ++++++ HonorAssistTrackerUi.lua | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/HonorAssist.lua b/HonorAssist.lua index c180750..6cedebc 100644 --- a/HonorAssist.lua +++ b/HonorAssist.lua @@ -108,6 +108,7 @@ end SLASH_HONORASSIST1 = "/honorassist" SLASH_HONORASSIST2 = "/honorassist help" SLASH_HONORASSIST3 = "/honorassist show" +SLASH_HONORASSIST2 = "/honorassist reset" SLASH_HONORASSIST4 = "/honorassist hide" SLASH_HONORASSIST5 = "/honorassist debug" SlashCmdList["HONORASSIST"] = function(msg) @@ -135,6 +136,10 @@ SlashCmdList["HONORASSIST"] = function(msg) HonorAssist:ShowTrackerUi(false) end + if subCommand == "reset" then + HonorAssist:ResetPosition() + end + if subCommand == "test" then HonorAssist:ProcessChatMsgCombatHonorGain("You have been awarded 200 honor points") end @@ -145,4 +150,5 @@ function HonorAssist:PrintHelpInformation() print("/honorassist, /honorassist help -- Displays help information for HonorAssist addon.") print("/honorassist show -- Shows the Honor Assist (Daily) tracker.") print("/honorassist hide -- Hides the Honor Assist (Daily) tracker.") + print("/honorassist reset -- Resets the position of the Honor Assist (Daily) tracker.") end diff --git a/HonorAssistTrackerUi.lua b/HonorAssistTrackerUi.lua index eda2cb9..ca333ab 100644 --- a/HonorAssistTrackerUi.lua +++ b/HonorAssistTrackerUi.lua @@ -106,6 +106,14 @@ function HonorAssist:SetPosition() end end +function HonorAssist:ResetPosition() + HonorAssistTrackerFramePositionX = nil + HonorAssistTrackerFramePositionY = nil + + HonorAssist.trackerFrame:ClearAllPoints() + HonorAssist.trackerFrame:SetPoint("CENTER", HonorAssistTrackerFramePositionX, HonorAssistTrackerFramePositionY) +end + function HonorAssist:UpdateDailyTrackerKills(kills) HonorAssist.totalKills:SetText(totalKillsText .. kills) end