Add keybind to toggle using the focus target. Add esES localization from Ben (Aesyl - US Tanaris) and koKR from Sayclub.
This commit is contained in:
@@ -24,6 +24,7 @@ _G["Omen"] = Omen
|
||||
-- Keybinding globals
|
||||
BINDING_HEADER_OMEN = "Omen"
|
||||
BINDING_NAME_OMENTOGGLE = L["Toggle Omen"]
|
||||
BINDING_NAME_OMENTOGGLEFOCUS = L["Toggle Focus"]
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
@@ -712,6 +713,16 @@ function Omen:UpdateGrips()
|
||||
end
|
||||
end
|
||||
|
||||
function Omen:ToggleFocus()
|
||||
db.UseFocus = not db.UseFocus
|
||||
if db.UseFocus then
|
||||
Omen:RegisterEvent("UNIT_TARGET")
|
||||
else
|
||||
Omen:UnregisterEvent("UNIT_TARGET")
|
||||
end
|
||||
Omen:UpdateBars()
|
||||
end
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
-- Omen warnings
|
||||
@@ -1447,15 +1458,7 @@ do
|
||||
UIDropDownMenu_AddButton(info, level)
|
||||
|
||||
info.text = "Use Focus Target"
|
||||
info.func = function()
|
||||
db.UseFocus = not db.UseFocus
|
||||
if db.UseFocus then
|
||||
Omen:RegisterEvent("UNIT_TARGET")
|
||||
else
|
||||
Omen:UnregisterEvent("UNIT_TARGET")
|
||||
end
|
||||
Omen:UpdateBars()
|
||||
end
|
||||
info.func = function() Omen:ToggleFocus() end
|
||||
info.checked = db.UseFocus
|
||||
UIDropDownMenu_AddButton(info, level)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user