It looks like you're new here. If you want to get involved, click one of these buttons!
function centreAt(sprite,x,y) local w=sprite:getWidth() local h=sprite:getHeight() sprite:setPosition(math.floor(x-w/2),math.floor(y+h/2)) end
s=TextField.new(nil,"Hello, world") centreAt(s,100,100)
Comments
https://github.com/ar2rsawseen/GiderosCodingEasy
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975