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
f:SetAttribute("displayed", "target");
f.unit = "target";
f.displayed = "target";
- f.nonraid = true;
f.prev = {};
targetUpdate = function()
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");
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);