Version 0.7.2-beta

- minimap button

- graphical move arrows

- crash on matches with 0-width
This commit is contained in:
2020-06-08 01:43:23 +02:00
parent 8e179692ee
commit 5b72ad3b78
18 changed files with 872 additions and 118 deletions

View File

@@ -172,6 +172,14 @@ function Grichelde:PrintOptions()
end, self.options.args.replacements.args)
end
--- Print DB
function Grichelde:PrintProfile()
self:PrefixedPrint(self.COLOR_CODES.PREFIX .. self.L.Debug_Profile .. 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)
end
--- Print DB replacements to chat frame
function Grichelde:PrintMappings()
self:PrefixedPrint(self.COLOR_CODES.PREFIX .. self.L.Debug_Mappings .. self.COLOR_CODES.CLOSE)
@@ -181,9 +189,11 @@ function Grichelde:PrintMappings()
end
--- Open UI windows with replacements in it
function Grichelde:ShowMappings()
if self.debugFrame and self.debugFrame:IsShown() then
self.debugFrame:Release(self.debugFrame)
function Grichelde:ToogleMappings()
local AceGUI = LibStub("AceGUI-3.0")
if self.debugFrame then
AceGUI:Release(self.debugFrame)
self.debugFrame = nil
else
local replacements = self.db.profile.replacements or {}
@@ -194,28 +204,40 @@ function Grichelde:ShowMappings()
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:SetAutoAdjustHeight(true)
--frame:SetFullHeight(true)
frame:SetLayout("Flow");
local function closeFrame(widget) AceGUI:Release(widget); self.debugFrame = nil end
frame:SetCallback("OnClose", closeFrame)
local hint = AceGUI:Create("Label");
hint:SetText(self.L.Debug_Mappings_Hint)
hint:SetFullWidth(true)
frame:AddChild(hint);
local scroll = AceGUI:Create("ScrollFrame");
scroll:SetFullWidth(true)
scroll:SetFullHeight(true)
scroll:SetLayout("Fill");
local configBox = AceGUI:Create("MultiLineEditBox");
configBox:SetLabel("")
local text = ""
tPrint(replacements, 0, {}, function(s) text = text .. s .. "|n" end)
configBox:SetLabel("")
configBox:SetText(text)
configBox:SetFullWidth(true)
configBox:SetFullHeight(true)
configBox:DisableButton(true)
--configBox:SetDisabled(true)
configBox:SetNumLines(30);
configBox:SetNumLines(50);
configBox:SetFocus()
scroll:AddChild(configBox);
frame:AddChild(configBox);
frame:AddChild(scroll);
self.debugFrame = frame
end
end