Check this mod I made, it "mirrors" the focus frame so one could put it on the left hand side of the screen. Just add
Code:
self.power:Hide()
self.power=nil
to the sharedStyle function inside the focus block, then HP/Power text should be hidden. Edit the self.name:SetPoint to position the name, adjust the size via SetFont.
Code:
oUF_Hank_hooks.ChangeFocus = {
sharedStyle = function(self, unit, isSingle)
if (unit == "focustarget") then
self.name:ClearAllPoints()
self.name:SetPoint("RIGHT")
end
if (unit == "focus") then
for i=1,4 do
self.health[i]:ClearAllPoints()
end
self.health[4]:SetPoint("RIGHT")
self.health[3]:SetPoint("RIGHT", self.health[4], "LEFT")
self.health[2]:SetPoint("RIGHT", self.health[3], "LEFT")
self.health[1]:SetPoint("RIGHT", self.health[2], "LEFT")
self.power:ClearAllPoints()
self.name:ClearAllPoints()
self.RaidIcon:ClearAllPoints()
self.name:SetPoint("BOTTOMRIGHT", self.power, "TOPRIGHT")
self.power:SetPoint("BOTTOMRIGHT", self.health[1], "BOTTOMLEFT")
self.RaidIcon:SetPoint("RIGHT",self.name,"LEFT",-10,0)
self.RaidIcon:SetPoint("TOP", self, "TOP", 0, -5)
self.Buffs.initialAnchor = "RIGHT"
self.Buffs["growth-x"] = "LEFT"
self.Debuffs.initialAnchor = "RIGHT"
self.Debuffs["growth-x"] = "LEFT"
end
end,
PostUpdateName = function(self)
if self.unit ~= "focus" then return end
if (self.name) then
self.RaidIcon:ClearAllPoints()
self.RaidIcon:SetPoint("TOP", self, "TOP", 0, -5)
-- Reanchor raid icon to the largest string (either name or power)
if self.name:GetWidth() >= self.power:GetWidth() then
self.RaidIcon:SetPoint("RIGHT", self.name, "LEFT", -10, 0)
else
self.RaidIcon:SetPoint("RIGHT", self.power, "LEFT", -10, 0)
end
end
end,
UpdateHealth = function(self)
if self.unit ~= "focus" then return end
local h, hMax
-- In vehicle
h, hMax = UnitHealth(self.unit), UnitHealthMax(self.unit)
local status = (not UnitIsConnected(self.unit) or nil) and "Off" or UnitIsGhost(self.unit) and "G" or UnitIsDead(self.unit) and "X"
if not status then
local hPerc = ("%d%%"):format(h / hMax * 100 + 0.5)
local len = string.len(hPerc)
for i = 1, 4 do
if i > len then
self.health[5 - i]:Hide()
self.healthFill[5 - i]:Hide()
else
local digit = string.sub(hPerc , -i, -i)
self.health[5 - i]:SetSize(oUF_Hank.digitTexCoords[digit][2], oUF_Hank.digitTexCoords["height"])
self.health[5 - i]:SetTexCoord(oUF_Hank.digitTexCoords[digit][1] / oUF_Hank.digitTexCoords["texWidth"], (oUF_Hank.digitTexCoords[digit][1] + oUF_Hank.digitTexCoords[digit][2]) / oUF_Hank.digitTexCoords["texWidth"], 1 / oUF_Hank.digitTexCoords["texHeight"], (1 + oUF_Hank.digitTexCoords["height"]) / oUF_Hank.digitTexCoords["texHeight"])
self.health[5 - i]:Show()
self.healthFill[5 - i]:SetSize(oUF_Hank.digitTexCoords[digit][2], oUF_Hank.digitTexCoords["height"] * h / hMax)
self.healthFill[5 - i]:SetTexCoord(oUF_Hank.digitTexCoords[digit][1] / oUF_Hank.digitTexCoords["texWidth"], (oUF_Hank.digitTexCoords[digit][1] + oUF_Hank.digitTexCoords[digit][2]) / oUF_Hank.digitTexCoords["texWidth"], (2 + 2 * oUF_Hank.digitTexCoords["height"] - oUF_Hank.digitTexCoords["height"] * h / hMax) / oUF_Hank.digitTexCoords["texHeight"], (2 + 2 * oUF_Hank.digitTexCoords["height"]) / oUF_Hank.digitTexCoords["texHeight"])
self.healthFill[5 - i]:Show()
end
end
self.power:ClearAllPoints()
self.power:SetPoint("BOTTOMRIGHT", self.health[5-len], "BOTTOMLEFT", 0, 0)
else
self.power:ClearAllPoints()
self.power:SetPoint("BOTTOMRIGHT", self.health[4], "BOTTOMLEFT", 0, 0)
end
end,
}