Hi, i have problem with setting SetOrientation("VERTICAL") on my statusbars it simply just doens't work and i dont understand i've tried to mess with SetPoint too doesn't change anything!
With "Vertical On"
http://imgur.com/a/kkil2
Without "Vertical"
http://imgur.com/a/U3qnm
Lua Code:
local HonorBar = CreateFrame("StatusBar", nil, UIParent)
HonorBar:SetOrientation("VERTICAL")
HonorBar:SetSize(235, 22)
HonorBar:SetPoint("CENTER", UIParent, 5, -3)
HonorBar:SetStatusBarTexture("Interface\\Buttons\\WHITE8x8")
HonorBar:SetStatusBarColor(222/255, 22/255, 22/255)
local HonorFont = HonorBar:CreateFontString(nil, "OVERLAY")
HonorFont:SetPoint("CENTER", HonorBar)
HonorFont:SetFont("Fonts\\ARIALN.TTF", 12, "THINOUTLINE")
HonorFont:SetShadowOffset(1, -1)
HonorFont:SetShadowColor(0,0,0)
local function UpdateHonorBar()
local Current, Max = UnitHonor("player"), UnitHonorMax("player")
HonorBar:SetMinMaxValues(0, Max)
HonorBar:SetValue(Current)
HonorFont:SetText(""..Current.." / "..Max.."")
end
HonorBar:SetScript("OnEnter", function(self)
local Level = UnitHonorLevel("player")
local LevelMax = GetMaxPlayerHonorLevel()
local Prestige = UnitPrestige("player")
local Current, Max = UnitHonor("player"), UnitHonorMax("player")
GameTooltip:SetOwner(self, "ANCHOR_CURSOR")
if Max == 0 then
GameTooltip:AddLine(PVP_HONOR_PRESTIGE_AVAILABLE)
GameTooltip:AddLine(PVP_HONOR_XP_BAR_CANNOT_PRESTIGE_HERE)
else
GameTooltip:AddLine(string.format("|cffee2222"..HONOR..": %d / %d (%d%% - %d/%d)|r", Current, Max, Current / Max * 100, (Max - Current) / Max))
GameTooltip:AddLine(string.format("|cffcccccc"..RANK..": %d / %d|r", Level, LevelMax))
GameTooltip:AddLine(string.format("|cffcccccc"..PVP_PRESTIGE_RANK_UP_TITLE..": %d|r", Prestige))
end
GameTooltip:Show()
end)
HonorBar:SetScript("OnLeave", function() GameTooltip:Hide() end)
HonorBar:RegisterEvent("PLAYER_ENTERING_WORLD")
HonorBar:RegisterEvent("HONOR_XP_UPDATE")
HonorBar:RegisterEvent("HONOR_LEVEL_UPDATE")
HonorBar:RegisterEvent("HONOR_PRESTIGE_UPDATE")
HonorBar:SetScript("OnEvent", UpdateHonorBar)