Hi,
I want to align my score number to right side of my HUD so it will be nicer. So I’ve googled and read that:
Currently, there is no way to align text upon creation. It is recommended you create the text, then set the reference point using object:setReferencePoint(), and adjust the x and y coordinates accordingly.
So I tried this:
scoreTextField = display.newText("0" ,display.contentWidth / 2 - 105, 5,"Tahoma", 16) scoreTextField:setReferencePoint(display.TopRightReferencePoint) scoreTextField.x, scoreTextField.y = display.contentWidth / 2 - 105, 6 HUDcontiner:insert(scoreTextField)
but alignment doesn’t change.
What am I missing here? I change reference point and re assigned the position.
Thanks.