Version 0.7.1-beta

- user reporting capabilities
- ignore Battle.net contacts
- screenshots

- graphical move arrows
This commit is contained in:
2020-06-07 14:29:49 +02:00
parent cb2c995a82
commit 8e179692ee
18 changed files with 98 additions and 18 deletions

View File

@@ -164,10 +164,58 @@ function Grichelde:LogPrint(logLevel, printFunc, obj, ...)
end
end
--- Print UI options to chat frame
function Grichelde:PrintOptions()
self:DebugPrint(self.options.args.replacements.args)
self:PrefixedPrint(self.COLOR_CODES.PREFIX .. self.L.Debug_Options .. self.COLOR_CODES.CLOSE)
self:LogPrint(-1, function(...)
print(self.COLOR_CODES.PREFIX .. self.L.AddonName .. self.COLOR_CODES.CLOSE .. ":", self:Format(...))
end, self.options.args.replacements.args)
end
--- Print DB replacements to chat frame
function Grichelde:PrintMappings()
self:DebugPrint(self.db.profile.replacements)
self:PrefixedPrint(self.COLOR_CODES.PREFIX .. self.L.Debug_Mappings .. self.COLOR_CODES.CLOSE)
self:LogPrint(-1, function(...)
print(self.COLOR_CODES.PREFIX .. self.L.AddonName .. self.COLOR_CODES.CLOSE .. ":", self:Format(...))
end, self.db.profile.replacements)
end
--- Open UI windows with replacements in it
function Grichelde:ShowMappings()
if self.debugFrame and self.debugFrame:IsShown() then
self.debugFrame:Release(self.debugFrame)
self.debugFrame = nil
else
local replacements = self.db.profile.replacements or {}
local repls = 0
for k, _ in pairs(replacements) do
if k and find(k, "^replacement_") then
repls = repls + 1
end
end
local AceGUI = LibStub("AceGUI-3.0")
local frame = AceGUI:Create("Frame");
frame:SetTitle(self.L.Debug_Mappings);
frame:SetStatusText(self:Format(self.L.Debug_Mappings_Found, repls))
frame:SetWidth(400);
frame:SetHeight(600);
frame:SetLayout("Fill");
local function closeFrame() frame:Release(frame) end
frame:SetCallback("OnClose", closeFrame)
local configBox = AceGUI:Create("MultiLineEditBox");
local text = ""
tPrint(replacements, 0, {}, function(s) text = text .. s .. "|n" end)
configBox:SetLabel("")
configBox:SetText(text)
configBox:DisableButton(true)
--configBox:SetDisabled(true)
configBox:SetNumLines(30);
configBox:SetFocus()
frame:AddChild(configBox);
self.debugFrame = frame
end
end