/trunk
## X-Localizations: enUS, frFR, deDE, ruRU, koKR |
## X-CompatibleLocales: enUS, enGB, esES, esMX, deDE, frFR, ruRU, koKR, zhCN, zhTW, enCN, enTW |
## X-Embeds: LibDataBroker-1.1 |
## Dependencies: Ace3, LibDBIcon-1.0, DewdropLib |
## OptionalDeps: Ace3, LibDBIcon-1.0, DewdropLib |
## Dependencies: Ace3, DewdropLib |
## OptionalDeps: LibDBIcon-1.0 |
## SavedVariables: EasyDNDDB |
## SavedVariablesPerCharacter: EasyDNDDBPC |
if not LibStub then return end |
local LDB, LDB_EV = LibStub:GetLibrary("LibDataBroker-1.1"), LibStub("AceEvent-3.0") |
local _, L, DEW, ICO = EasyDND, LibStub("AceLocale-3.0"):GetLocale("EasyDND"), LibStub("Dewdrop-2.0"), LibStub("LibDBIcon-1.0") |
if not ( LDB or _ or L or DEW or ICO ) then return end |
local _, L, DEW, ICO = EasyDND, LibStub("AceLocale-3.0"):GetLocale("EasyDND"), LibStub("Dewdrop-2.0"), LibStub("LibDBIcon-1.0", true) |
if not ( LDB or _ or L or DEW ) then return end |
local ICONOFF = "Interface\\AddOns\\EasyDND\\icons\\dndoff" |
local ICONON = "Interface\\AddOns\\EasyDND\\icons\\dndon" |
local function ToggleMinimap() |
if _.db.profile.showminimap then |
ICO:Show("EasyDND") |
if ICO then ICO:Show("EasyDND") else _:Print("Minimap icon OFF, install LibDBIcon-1.0 or disable the show minimap option.") end |
else |
ICO:Hide("EasyDND") |
if ICO then ICO:Hide("EasyDND") end |
end |
end |
end |
_.LDB = ldb |
_.LDB.DEW = DEW |
_.LDB.ICO = ICO |
if ICO then _.LDB.ICO = ICO end |
_.LDB.ICONON = ICONON |
_.LDB.ICONOFF = ICONOFF |
_.LDB.ToggleMinimap = ToggleMinimap |
InitGlobalFunctions() |
StoreOriginalFunctions() |
_.LDB.InitLDB() |
_.LDB.ICO:Register("EasyDND", _.LDB, _.db.profile) |
if _.LDB.ICO then _.LDB.ICO:Register("EasyDND", _.LDB, _.db.profile) end |
end |
function EasyDND:OnEnable() |