hey,
im a "beginner" in lua and i want to make a wow addon like IceHud,
but my problem is:
the vertical texture (my health) sizes down if i have no health is warped
here my code:
Code:
local Silverstyle = CreateFrame("Frame", "SilverstyleBackground")
local SilverstyleBar = Silverstyle:CreateTexture("SilverstyleStatusBar")
Silverstyle:SetWidth(128)
Silverstyle:SetHeight(256)
SilverstyleBar:SetWidth(128)
SilverstyleBar:SetHeight(256)
Silverstyle:SetPoint("CENTER", -100, 0)
SilverstyleBar:SetPoint("CENTER", Silverstyle)
Silverstyle:SetBackdrop({bgFile = "Interface\\AddOns\\Silverstyle\\BarBackground.tga"})
SilverstyleBar:SetTexture("Interface\\AddOns\\Silverstyle\\BarTexture.tga")
Silverstyle:SetScript("OnUpdate", function()
SilverstyleBar:SetHeight(floor(UnitHealth("player") / UnitHealthMax("player") * 256))
end )
is it possible to cut the full texture from top to bottom without sizing?
sry for bad english, im german..
thanks 4 answers!