Fix grid drawing

This commit is contained in:
Squishy (C6H12O6+NaCl+H2O)
2024-05-25 15:23:44 +07:00
parent fda054a2f5
commit dfeece9ddc
3 changed files with 24 additions and 19 deletions

View File

@@ -46,7 +46,7 @@ control_type.button.__index=control_type.button
function control_type.button:new(data)
local data=data or {}
return setmetatable({
show=data.show~=nil and data.show or true,
show=data.show==nil and true or data.show,
x=data.x or 320,
y=data.y or 240,
r=data.r or 80, -- size
@@ -59,6 +59,7 @@ function control_type.button:new(data)
end
function control_type.button:export()
return {
type = 'button',
show = self.show,
x = self.x,
y = self.y,