Fixed button image off center if button has margin left/top

This commit is contained in:
2026-04-15 22:07:45 -05:00
parent a47505e7fa
commit 3375d2d224

View File

@@ -23,8 +23,8 @@ module CyberarmEngine
def draw_image def draw_image
@image.draw( @image.draw(
styled(:border_thickness_left) + styled(:padding_left) + @x, styled(:border_thickness_left) + styled(:margin_left) + styled(:padding_left) + @x,
styled(:border_thickness_top) + styled(:padding_top) + @y, styled(:border_thickness_top) + styled(:margin_top) + styled(:padding_top) + @y,
@z + 2, @z + 2,
@scale_x, @scale_y, @text.color @scale_x, @scale_y, @text.color
) )