X-Git-Url: https://www.aleksib.fi/git/wowui.git/blobdiff_plain/4fb357642ebf6b8b7f103bf86e67a44de1dd00a7..156861c6dd4b4d4f46b7fd6a70e8458e3aa75af6:/kehys/target.lua?ds=inline diff --git a/kehys/target.lua b/kehys/target.lua index 342743b..9b98d94 100644 --- a/kehys/target.lua +++ b/kehys/target.lua @@ -20,7 +20,7 @@ local function initTarget(parent, width, height, update, event) local f = CreateFrame("Button", "kehysTarget", parent, "SecureUnitButtonTemplate,SecureHandlerStateTemplate"); f:Hide(); - f:SetPoint("CENTER", parent, "CENTER", 300, -178); + f:SetPoint("CENTER", parent, "CENTER", 290, -178); f:SetWidth(width); f:SetHeight(height); f.barwidth = width - 2; -- 1px padding @@ -28,7 +28,6 @@ local function initTarget(parent, width, height, update, event) f:SetAttribute("displayed", "target"); f.unit = "target"; f.displayed = "target"; - f.nonraid = true; f.prev = {}; targetUpdate = function() @@ -36,6 +35,8 @@ local function initTarget(parent, width, height, update, event) update(f); end f:SetScript("OnEvent", event); + f:SetScript("OnHide", function (frame) frame.prev = {} end); + f:SetScript("OnShow", function (frame) update(frame) end); f:RegisterForClicks("AnyDown"); f:SetAttribute("*type1", "target"); f:SetAttribute("*type2", "togglemenu"); @@ -53,7 +54,7 @@ local function initTarget(parent, width, height, update, event) f.health:SetPoint("TOPLEFT", f.background, "TOPLEFT"); f.health:SetPoint("BOTTOMLEFT", f.background, "LEFT", 0, -height/8); f.health:SetTexture(barTexture); - f.health:SetVertexColor(0.8, 0.8, 0.8); + f.health:SetVertexColor(0.7, 0.7, 0.7); f.health:Hide(); f.mana = f:CreateTexture(nil, "BORDER"); f.mana:SetPoint("TOPLEFT", f.background, "LEFT", 0, -height/8);