Hi,
So I am using the multiline functionality of display.newText and I am predefining the width and height the text image can be. Is there a way to detect if the text is too big for the predefined width and height parameters? I am trying to create something that basically shows that if the height of the predefined does not fit the entire message I want it to then show “…” so the user knows that there is more to the message.
If anyone knows how to detect if the text is not fitting inside the parameters that would be great.
This is a piece of my code below:
local options = { text = textMessage, x = display.contentWidth/2, y = yValue, width = display.contentWidth/1.2, height = display.contentWidth/1.8, font = native.systemFontBold, fontSize = display.contentHeight/30, align = "left" -- Alignment parameter } local text = display.newText(options) text:setFillColor(1,1,1) text.y = text.y + text.height/1.7 --I am not sure what to compare the display.newText object height value to. if textMessage.height \> text.height then print("yo") end