Idea Fell Apart
At 100% scaling this image appears correctly:
At 200% scaling it falls apart. The line points are in fact scaled correctly, but they are not surrounding the shape as intended:
So I think instead of converting the coordinate system back and forth between scaled and non-scaled coordinates, the creation function needs to multiply the coordinates by the scaling factor. That means if you create a 70x30 pixel widget and the GUI is using a 200% scaling factor, it will actually create a 140x60 pixel widget instead. However, the little issues like what is pictured above will go away.
This sucks though because if you do this, you will get wrong results:
gui:SetScale(2) local widgetA = Widget:Create(0,0,200,20,gui) local widgetB = Widget:Create(0,0,200, widgetA:GetPosition().y + widgetA:GetHeight(),gui )
widgetB would be created at a Y position of 80 (20 * 2 * 2)
I fear whatever I implement will simply get ignored by script programmers and they will never test against different DPI scales.
9 Comments
Recommended Comments