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/UILibLines.lua
2020-11-26 02:31:28 +01: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, "BackdropTemplate");
VertLine:SetBackdrop({bgFile = Const.ImagesDir.."VertLine.tga", edgeFile = nil, tile = false, tileSize = 1, edgeSize = 1, insets = {left=0, right=0, bottom=0, top=0}});
VertLine:SetWidth(Const.VLineThickness / UIParent:GetScale());
local HorizLine = CreateFrame("FRAME", nil, UIParent, "BackdropTemplate");
HorizLine:SetBackdrop({bgFile = Const.ImagesDir.."HorizontalLine.tga", edgeFile = nil, tile = false, tileSize = 1, edgeSize = 1, 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