X-Git-Url: https://www.aleksib.fi/git/wowui.git/blobdiff_plain/3e6730c2c495d9016dde6cbb76c2bd6f86b05cbe..f8af9dd773208e04ccc15d3dbc814dd0727788e8:/OmaUF/PetFrame.lua?ds=sidebyside diff --git a/OmaUF/PetFrame.lua b/OmaUF/PetFrame.lua index e739ba5..93da251 100644 --- a/OmaUF/PetFrame.lua +++ b/OmaUF/PetFrame.lua @@ -2,8 +2,8 @@ local _; local unpack, pairs = unpack, pairs; local format = string.format; -local GameTooltip = nil; -local GameTooltip_SetDefaultAnchor = nil; +local GameTooltip = GameTooltip; +local GameTooltip_SetDefaultAnchor = GameTooltip_SetDefaultAnchor; local registerUnitEvents = OmaUFEvents.RegisterUnitEvents; local unitEvent = OmaUFEvents.UnitEvent; @@ -14,14 +14,13 @@ local bgColor = Settings.BgColor; local healthColor = Settings.HealthColor; local shieldColor = Settings.ShieldColor; local shieldhlColor = Settings.ShieldhlColor; -local healpredColor = Settings.HealpredColor; -local healabsorbColor = Settings.HealabsorbColor; local width, height = Settings.Pet.Width, Settings.Pet.Height; local anchorX, anchorY = Settings.Pet.AnchorX, Settings.Pet.AnchorY; -- placeholders with visible values when error happens local attributes = {}; local inheritedFrames = "SecureUnitButtonTemplate,SecureHandlerStateTemplate"; +local barTexture = "Interface\\AddOns\\OmaRF\\images\\minimalist"; local function frameShow(frame) frame:RegisterEvent("UNIT_ENTERED_VEHICLE"); @@ -54,8 +53,6 @@ local vehicletoggle = [=[ ]=] function OmaUnitFrames.InitializePet(parent) - GameTooltip = _G["GameTooltip"]; - GameTooltip_SetDefaultAnchor = _G["GameTooltip_SetDefaultAnchor"]; attributes = Settings.Character.Clickheal; -- TODO pet clickheal separate with Mend Pet etc. local secure = CreateFrame("Button", "OmaPetSecure", parent, inheritedFrames); @@ -85,12 +82,12 @@ function OmaUnitFrames.InitializePet(parent) frame.healthback = frame:CreateTexture(nil, "BACKGROUND", nil, 1); frame.healthback:SetPoint("TOPLEFT", frame, "TOPLEFT", 1, -1); frame.healthback:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -1, 1); - frame.healthback:SetTexture("Interface\\RaidFrame\\Raid-Bar-Hp-Fill"); + frame.healthback:SetTexture(barTexture); frame.healthback:SetVertexColor(unpack(bgColor)); frame.health = frame:CreateTexture(nil, "BORDER"); frame.health:SetPoint("TOPLEFT", frame.healthback, "TOPLEFT"); frame.health:SetPoint("BOTTOMLEFT", frame.healthback, "BOTTOMLEFT"); - frame.health:SetTexture("Interface\\RaidFrame\\Raid-Bar-Hp-Fill"); + frame.health:SetTexture(barTexture); frame.health:SetVertexColor(unpack(healthColor)); frame.healthText = frame:CreateFontString(nil, "ARTWORK", "GameFontHighlight"); frame.healthText:SetPoint("RIGHT", frame.healthback, "RIGHT", -2, 0);