click through frames health/power bar
This commit is contained in:
parent
67edecf8d1
commit
ad130af188
22
Frame.lua
22
Frame.lua
@ -32,7 +32,7 @@ function Gladdy:CreateFrame()
|
||||
self.frame = CreateFrame("Frame", "GladdyFrame", UIParent)
|
||||
|
||||
self.frame:SetClampedToScreen(true)
|
||||
self.frame:EnableMouse(true)
|
||||
self.frame:EnableMouse(false)
|
||||
self.frame:SetMovable(true)
|
||||
self.frame:RegisterForDrag("LeftButton")
|
||||
|
||||
@ -187,7 +187,7 @@ function Gladdy:UpdateFrame()
|
||||
local button = self.buttons["arena" .. i]
|
||||
button:SetWidth(self.db.barWidth + extraBarWidth)
|
||||
button:SetHeight(self.db.healthBarHeight)
|
||||
button.secure:SetWidth(self.db.barWidth + extraBarWidth)
|
||||
button.secure:SetWidth(self.db.barWidth)
|
||||
button.secure:SetHeight(self.db.healthBarHeight + extraBarHeight)
|
||||
|
||||
button:ClearAllPoints()
|
||||
@ -195,18 +195,18 @@ function Gladdy:UpdateFrame()
|
||||
if (self.db.growUp) then
|
||||
if (i == 1) then
|
||||
button:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT", self.db.padding + 2, 0)
|
||||
button.secure:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT", self.db.padding + 2, 0)
|
||||
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
||||
else
|
||||
button:SetPoint("BOTTOMLEFT", self.buttons["arena" .. (i - 1)], "TOPLEFT", 0, margin + self.db.bottomMargin)
|
||||
button.secure:SetPoint("BOTTOMLEFT", self.buttons["arena" .. (i - 1)], "TOPLEFT", 0, margin + self.db.bottomMargin)
|
||||
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
||||
end
|
||||
else
|
||||
if (i == 1) then
|
||||
button:SetPoint("TOPLEFT", self.frame, "TOPLEFT", self.db.padding + 2, 0)
|
||||
button.secure:SetPoint("TOPLEFT", self.frame, "TOPLEFT", self.db.padding + 2, 0)
|
||||
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
||||
else
|
||||
button:SetPoint("TOPLEFT", self.buttons["arena" .. (i - 1)], "BOTTOMLEFT", 0, -margin - self.db.bottomMargin)
|
||||
button.secure:SetPoint("TOPLEFT", self.buttons["arena" .. (i - 1)], "BOTTOMLEFT", 0, -margin - self.db.bottomMargin)
|
||||
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
||||
end
|
||||
end
|
||||
|
||||
@ -257,6 +257,7 @@ function Gladdy:CreateButton(i)
|
||||
end
|
||||
|
||||
local button = CreateFrame("Frame", "GladdyButtonFrame" .. i, self.frame)
|
||||
button:EnableMouse(false)
|
||||
button:SetAlpha(0)
|
||||
|
||||
local secure = CreateFrame("Button", "GladdyButton" .. i, button, "SecureActionButtonTemplate")
|
||||
@ -265,12 +266,9 @@ function Gladdy:CreateButton(i)
|
||||
secure:SetAttribute("*type1", "target")
|
||||
secure:SetAttribute("*type2", "focus")
|
||||
secure:SetAttribute("unit", "arena" .. i)
|
||||
|
||||
button:RegisterEvent("UNIT_NAME_UPDATE")
|
||||
button:RegisterEvent("ARENA_OPPONENT_UPDATE")
|
||||
button:RegisterEvent("ARENA_COOLDOWNS_UPDATE")
|
||||
button:RegisterEvent("ARENA_CROWD_CONTROL_SPELL_UPDATE")
|
||||
button:RegisterUnitEvent("UNIT_CONNECTION", "arena" .. i)
|
||||
--secure.texture = secure:CreateTexture(nil, "OVERLAY")
|
||||
--secure.texture:SetAllPoints(secure)
|
||||
--secure.texture:SetTexture("Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp")
|
||||
|
||||
button.id = i
|
||||
button.unit = "arena" .. i
|
||||
|
@ -42,6 +42,7 @@ end
|
||||
|
||||
function Auras:CreateFrame(unit)
|
||||
local auraFrame = CreateFrame("Frame", nil, Gladdy.modules.Classicon.frames[unit])
|
||||
auraFrame:EnableMouse(false)
|
||||
auraFrame:SetFrameStrata("MEDIUM")
|
||||
auraFrame:SetFrameLevel(3)
|
||||
|
||||
|
@ -506,6 +506,7 @@ function BuffsDebuffs:AddAura(unit, spellID, auraType, duration, timeLeft, stack
|
||||
aura = tremove(self.framePool, #self.framePool)
|
||||
else
|
||||
aura = CreateFrame("Frame")
|
||||
aura:EnableMouse(false)
|
||||
aura:SetFrameLevel(3)
|
||||
aura.texture = aura:CreateTexture(nil, "BACKGROUND")
|
||||
aura.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||
|
@ -57,6 +57,7 @@ end
|
||||
|
||||
function Castbar:CreateFrame(unit)
|
||||
local castBar = CreateFrame("Frame", nil, Gladdy.buttons[unit], BackdropTemplateMixin and "BackdropTemplate")
|
||||
castBar:EnableMouse(false)
|
||||
castBar.unit = unit
|
||||
|
||||
castBar:SetBackdrop({ edgeFile = Gladdy.LSM:Fetch("border", Gladdy.db.castBarBorderStyle),
|
||||
|
@ -93,6 +93,7 @@ function Cooldowns:CreateFrame(unit)
|
||||
local button = Gladdy.buttons[unit]
|
||||
-- Cooldown frame
|
||||
local spellCooldownFrame = CreateFrame("Frame", nil, button)
|
||||
spellCooldownFrame:EnableMouse(false)
|
||||
for x = 1, 14 do
|
||||
local icon = CreateFrame("Frame", nil, spellCooldownFrame)
|
||||
icon:EnableMouse(false)
|
||||
|
@ -67,6 +67,7 @@ end
|
||||
|
||||
function Diminishings:CreateFrame(unit)
|
||||
local drFrame = CreateFrame("Frame", nil, Gladdy.buttons[unit])
|
||||
drFrame:EnableMouse(false)
|
||||
|
||||
for i = 1, 16 do
|
||||
local icon = CreateFrame("Frame", "GladdyDr" .. unit .. "Icon" .. i, drFrame)
|
||||
|
@ -36,6 +36,7 @@ function Powerbar:CreateFrame(unit)
|
||||
local button = Gladdy.buttons[unit]
|
||||
|
||||
local powerBar = CreateFrame("Frame", nil, Gladdy.buttons[unit], BackdropTemplateMixin and "BackdropTemplate")
|
||||
powerBar:EnableMouse(false)
|
||||
powerBar:SetBackdrop({ edgeFile = Gladdy.LSM:Fetch("border", Gladdy.db.powerBarBorderStyle),
|
||||
edgeSize = Gladdy.db.powerBarBorderSize })
|
||||
powerBar:SetBackdropBorderColor(Gladdy.db.powerBarBorderColor.r, Gladdy.db.powerBarBorderColor.g, Gladdy.db.powerBarBorderColor.b, Gladdy.db.powerBarBorderColor.a)
|
||||
|
@ -77,6 +77,7 @@ end
|
||||
|
||||
function Racial:CreateFrame(unit)
|
||||
local racial = CreateFrame("Button", "GladdyTrinketButton" .. unit, Gladdy.buttons[unit])
|
||||
racial:EnableMouse(false)
|
||||
racial.texture = racial:CreateTexture(nil, "BACKGROUND")
|
||||
racial.texture:SetAllPoints(racial)
|
||||
racial.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask")
|
||||
|
@ -71,6 +71,7 @@ end
|
||||
|
||||
function Trinket:CreateFrame(unit)
|
||||
local trinket = CreateFrame("Button", "GladdyTrinketButton" .. unit, Gladdy.buttons[unit])
|
||||
trinket:EnableMouse(false)
|
||||
trinket.texture = trinket:CreateTexture(nil, "BACKGROUND")
|
||||
trinket.texture:SetAllPoints(trinket)
|
||||
trinket.texture:SetTexture("Interface\\Icons\\INV_Jewelry_TrinketPVP_02")
|
||||
|
Loading…
Reference in New Issue
Block a user