Hi all,
I’m trying to position this “continue…” text in the bottom-right of the screen and I can’t get it to work. Text doesn’t move regardless of the align value. I’ve read Rob’s text positioning tutorial (https://coronalabs.com/blog/2014/02/11/tutorial-methods-for-positioning-text/) multiple times but I’m still missing something.
I need to have it right-aligned because translated text will likely lead to longer strings.
--Setup Text options local textColor = {0.72, 0.9, 0.16, 1} local textOptions = { text = "", font = native.newFont("FSEX300.ttf"), fontSize = 40, x = xStart, y = yStart, width = 950, height = 0, align = "left" } --Draws continue button in bottom-right of terminal screen function DrawContinueButton() print ("Drawing Continue..") textOptions.text = "Press any key to continue..."; local continueLabel = display.newText(textOptions) continueLabel.anchorX = 0; continueLabel.anchorY = 0; --Setting this in textOptions wasn't working for some reason continueLabel.width = display.viewableContentWidth; continueLabel.align = "right"; continueLabel.x = display.contentCenterX/2 continueLabel.y = maxLinePosY + 110 continueLabel:setFillColor(unpack(textColor)); --Green continueLabel:toBack(); end
Thanks in advance!
Dave.