1
0
Bifurcation 0
Ce dépôt a été archivé le 2024-10-10. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
ButtonForge-classic/ButtonForge/UILibLines.lua
2018-05-12 10:23:16 +10:00

50 lignes
1,4 Kio
Lua

--[[
Author: Alternator (Massiner of Nathrezim)
Copyright 2011
Notes:
]]
local UILib = BFUILib;
local Const = BFConst;
local VertLine = CreateFrame("FRAME", nil, UIParent);
VertLine:SetBackdrop({bgFile = Const.ImagesDir.."VertLine.tga", edgeFile = nil, tile = false, tileSize = 1, edgeSize = 0, insets = {left=0, right=0, bottom=0, top=0}});
VertLine:SetWidth(Const.VLineThickness / UIParent:GetScale());
local HorizLine = CreateFrame("FRAME", nil, UIParent);
HorizLine:SetBackdrop({bgFile = Const.ImagesDir.."HorizontalLine.tga", edgeFile = nil, tile = false, tileSize = 1, edgeSize = 0, insets = {left=0, right=0, bottom=0, top=0}});
HorizLine:SetHeight(Const.HLineThickness / UIParent:GetScale());
function UILib.ShowVerticalLine(X, YTop, YBottom)
VertLine:Show();
VertLine:ClearAllPoints();
VertLine:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", X, YTop);
VertLine:SetHeight(YTop - YBottom);
end
function UILib.HideVerticalLine()
VertLine:Hide();
end
function UILib.ShowHorizontalLine(Y, XLeft, XRight)
HorizLine:Show();
HorizLine:ClearAllPoints();
HorizLine:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", XLeft, Y);
HorizLine:SetWidth(XRight - XLeft);
end
function UILib.HideHorizontalLine()
HorizLine:Hide();
end
function UILib.RescaleLines()
VertLine:SetWidth(Const.VLineThickness / UIParent:GetScale());
HorizLine:SetHeight(Const.HLineThickness / UIParent:GetScale());
end