mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
...
This commit is contained in:
@@ -148,7 +148,7 @@ function AB:BindUpdate(button, spellmacro)
|
||||
GameTooltip:Show()
|
||||
GameTooltip:SetScript("OnHide", function()
|
||||
this:SetOwner(bind, "ANCHOR_NONE")
|
||||
E:Point(this, "BOTTOM", bind, "TOP", 0, 1)
|
||||
this:SetPoint("BOTTOM", bind, "TOP", 0, 1)
|
||||
this:AddLine(bind.button.name, 1, 1, 1)
|
||||
bind.button.bindings = {GetBindingKey(bind.button.bindstring)}
|
||||
if getn(bind.button.bindings) == 0 then
|
||||
@@ -163,6 +163,7 @@ function AB:BindUpdate(button, spellmacro)
|
||||
this:SetScript("OnHide", nil)
|
||||
end)
|
||||
else
|
||||
bind.button.action = tonumber(button.action)
|
||||
bind.button.name = button:GetName()
|
||||
|
||||
bind.button.bindstring = bind.button.buttonType
|
||||
@@ -265,7 +266,7 @@ function AB:LoadKeyBinder()
|
||||
b = EnumerateFrames(b)
|
||||
end
|
||||
|
||||
for b, _ in pairs(self["handledButtons"]) do
|
||||
for b in pairs(self.handledbuttons) do
|
||||
self:RegisterButton(b, true)
|
||||
end
|
||||
|
||||
@@ -283,14 +284,16 @@ function AB:LoadKeyBinder()
|
||||
f:SetMovable(true)
|
||||
f:SetFrameLevel(99)
|
||||
f:SetClampedToScreen(true)
|
||||
E:Size(f, 360, 130)
|
||||
E:SetTemplate(f, "Transparent")
|
||||
f:SetWidth(360)
|
||||
f:SetHeight(130)
|
||||
f:SetTemplate("Transparent")
|
||||
f:Hide()
|
||||
|
||||
local header = CreateFrame("Button", nil, f)
|
||||
E:SetTemplate(header, "Default", true)
|
||||
E:Size(header, 100, 25)
|
||||
E:Point(header, "CENTER", f, "TOP")
|
||||
header:SetWidth(100)
|
||||
header:SetHeight(25)
|
||||
header:SetPoint("CENTER", f, "TOP")
|
||||
header:SetFrameLevel(header:GetFrameLevel() + 2)
|
||||
header:EnableMouse(true)
|
||||
header:RegisterForClicks("LeftButtonUp", "RightButtonUp", "LeftButtonDown", "RightButtonDown")
|
||||
@@ -299,22 +302,22 @@ function AB:LoadKeyBinder()
|
||||
|
||||
local title = header:CreateFontString("OVERLAY")
|
||||
E:FontTemplate(title)
|
||||
E:Point(title, "CENTER", header, "CENTER")
|
||||
title:SetPoint("CENTER", header, "CENTER")
|
||||
title:SetText("Key Binds")
|
||||
|
||||
local desc = f:CreateFontString("ARTWORK")
|
||||
desc:SetFontObject("GameFontHighlight")
|
||||
desc:SetJustifyV("TOP")
|
||||
desc:SetJustifyH("LEFT")
|
||||
E:Point(desc, "TOPLEFT", 18, -32)
|
||||
E:Point(desc, "BOTTOMRIGHT", -18, 48)
|
||||
desc:SetPoint("TOPLEFT", 18, -32)
|
||||
desc:SetPoint("BOTTOMRIGHT", -18, 48)
|
||||
desc:SetText(L["Hover your mouse over any actionbutton or spellbook button to bind it. Press the escape key or right click to clear the current actionbutton's keybinding."])
|
||||
|
||||
local perCharCheck = CreateFrame("CheckButton", f:GetName().."CheckButton", f, "OptionsCheckButtonTemplate")
|
||||
_G[perCharCheck:GetName().."Text"]:SetText(CHARACTER_SPECIFIC_KEYBINDINGS)
|
||||
|
||||
perCharCheck:SetScript("OnShow", function()
|
||||
perCharCheck:SetChecked(GetCurrentBindingSet() == 2)
|
||||
this:SetChecked(GetCurrentBindingSet() == 2)
|
||||
end)
|
||||
|
||||
perCharCheck:SetScript("OnClick", function()
|
||||
@@ -326,7 +329,7 @@ function AB:LoadKeyBinder()
|
||||
end)
|
||||
|
||||
perCharCheck:SetScript("OnEnter", function()
|
||||
GameTooltip:SetOwner(perCharCheck, "ANCHOR_RIGHT")
|
||||
GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
|
||||
GameTooltip:SetText(CHARACTER_SPECIFIC_KEYBINDING_TOOLTIP, nil, nil, nil, nil, 1)
|
||||
end)
|
||||
|
||||
@@ -348,9 +351,9 @@ function AB:LoadKeyBinder()
|
||||
end)
|
||||
|
||||
--position buttons
|
||||
E:Point(perCharCheck, "BOTTOMLEFT", discard, "TOPLEFT", 0, 2)
|
||||
E:Point(save, "BOTTOMRIGHT", -14, 10)
|
||||
E:Point(discard, "BOTTOMLEFT", 14, 10)
|
||||
perCharCheck:SetPoint("BOTTOMLEFT", discard, "TOPLEFT", 0, 2)
|
||||
save:SetPoint("BOTTOMRIGHT", -14, 10)
|
||||
discard:SetPoint("BOTTOMLEFT", 14, 10)
|
||||
|
||||
local S = E:GetModule("Skins")
|
||||
S:HandleCheckBox(perCharCheck)
|
||||
|
||||
Reference in New Issue
Block a user