Version 0.9.1-rc
- emote detection mixed in other channels - minimap button and dialog no longer resets active state after profile change - default entries are no longer shown after example import - better handling of capture groups and character sets
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
local _G = _G
|
||||
local Grichelde = _G.Grichelde or {}
|
||||
|
||||
local cPrefix, cGreen, cRed
|
||||
= Grichelde.F.cPrefix, Grichelde.F.cGreen, Grichelde.F.cRed
|
||||
|
||||
|
||||
--- add Minimap button
|
||||
function Grichelde:MinimapButton()
|
||||
local function clickHandler(_, button)
|
||||
@@ -84,26 +88,42 @@ end
|
||||
|
||||
function Grichelde:ToggleActivation()
|
||||
if (self.db.profile.enabled == true) then
|
||||
if (self.dialog == nil) or (self.dialog.OpenFrames[self.name] == nil) then
|
||||
self:PrefixedPrint(self.L.Profiles_Deactivated, cRed(self.db:GetCurrentProfile()))
|
||||
end
|
||||
self:Deactivate()
|
||||
else
|
||||
if (self.dialog == nil) or (self.dialog.OpenFrames[self.name] == nil) then
|
||||
self:PrefixedPrint(self.L.Profiles_Activated, cGreen(self.db:GetCurrentProfile()))
|
||||
end
|
||||
self:Activate()
|
||||
end
|
||||
end
|
||||
|
||||
function Grichelde:RefreshMinimap()
|
||||
if (self.db.profile.enabled == true) then
|
||||
self:Activate()
|
||||
else
|
||||
self:Deactivate()
|
||||
end
|
||||
end
|
||||
|
||||
function Grichelde:Activate()
|
||||
self.db.profile.enabled = true
|
||||
|
||||
-- refresh option UI if open at the moment
|
||||
if (self.dialog ~= nil) and (self.dialog.OpenFrames[self.name] ~= nil) then
|
||||
self.dialog:SelectGroup(self.name, "enabled")
|
||||
self.dialog:SelectGroup(self.name)
|
||||
local namePlusVersion = self:Format(self.L.AddonNamePlusVersion, self.L.AddonName, self.version)
|
||||
local statusText = self:Format(self.L.AddonLoaded, namePlusVersion)
|
||||
self.dialog.OpenFrames[self.name]:SetStatusText(statusText)
|
||||
end
|
||||
|
||||
self.ldb.iconR = Grichelde.MINIMAP_ENABLED
|
||||
self.ldb.iconG = Grichelde.MINIMAP_ENABLED
|
||||
self.ldb.iconB = Grichelde.MINIMAP_ENABLED
|
||||
if (self.ldb ~= nil) then
|
||||
self.ldb.iconR = Grichelde.MINIMAP_ENABLED
|
||||
self.ldb.iconG = Grichelde.MINIMAP_ENABLED
|
||||
self.ldb.iconB = Grichelde.MINIMAP_ENABLED
|
||||
end
|
||||
end
|
||||
|
||||
function Grichelde:Deactivate()
|
||||
@@ -111,14 +131,16 @@ function Grichelde:Deactivate()
|
||||
|
||||
-- refresh option UI if open at the moment
|
||||
if (self.dialog ~= nil) and (self.dialog.OpenFrames[self.name] ~= nil) then
|
||||
self.dialog:SelectGroup(self.name, "enabled")
|
||||
self.dialog:SelectGroup(self.name)
|
||||
local namePlusVersion = self:Format(self.L.AddonNamePlusVersion, self.L.AddonName, self.version)
|
||||
local statusText = self:Format(self.L.AddonUnloaded, namePlusVersion)
|
||||
self.dialog.OpenFrames[self.name]:SetStatusText(statusText)
|
||||
end
|
||||
|
||||
self.ldb.iconR = Grichelde.MINIMAP_DARKENDED
|
||||
self.ldb.iconG = Grichelde.MINIMAP_DARKENDED
|
||||
self.ldb.iconB = Grichelde.MINIMAP_DARKENDED
|
||||
if (self.ldb ~= nil) then
|
||||
self.ldb.iconR = Grichelde.MINIMAP_DARKENDED
|
||||
self.ldb.iconG = Grichelde.MINIMAP_DARKENDED
|
||||
self.ldb.iconB = Grichelde.MINIMAP_DARKENDED
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user