Probably fix layout issues caused by floating point errors where an element is wrapped when it has space (e.g. 2 elements with a width 0.5 not fitting properly)

This commit is contained in:
2022-05-02 19:08:47 -05:00
parent 300e7c4e59
commit 31e909eb30
6 changed files with 16 additions and 14 deletions

View File

@@ -45,8 +45,8 @@ module CyberarmEngine
@scale_y = 1
end
@width = _width || @image.width.round * @scale_x
@height = _height || @image.height.round * @scale_y
@width = _width || @image.width.floor * @scale_x
@height = _height || @image.height.floor * @scale_y
update_background
end