Hello, I have been working on my EFT-Styled inventory system.
I encountered a problem when viewport size changed the grid line shifted by 1 pixel.
[Before change]
[After change]
Here is my code for creating the grid line:
local GridLines = {}
for Column = 1, Width - 1 do
local Line = LineTemplate:Clone()
Line.Size = UDim2.new(0, 1, 1, 0)
Line.AnchorPoint = Vector2.new(0.5, 0.5)
Line.Position = UDim2.fromScale(Column / Width, 0.5)
Line.Parent = StrokesLayer
table.insert(GridLines, Line)
end
for Row = 1, Height - 1 do
local Line = LineTemplate:Clone()
Line.Size = UDim2.new(1, 0, 0, 1)
Line.AnchorPoint = Vector2.new(0.5, 0.5)
Line.Position = UDim2.fromScale(0.5, Row / Height)
Line.Parent = StrokesLayer
table.insert(GridLines, Line)
end


