display.newText with text that's longer than the screen width does not display

2 replies [Last post]
dknell
User offline. Last seen 20 weeks 6 days ago. Offline
Joined: 12 Aug 2010

The following only shows a white block where the text should be. If I shorten the text, then it works fine. I verified that the same thing happens when this code is built for and run on the iPhone.

1
2
3
local test = display.newText("Lua is a programming language known for its speed and ease of use by non-programmers, and is commonly used in the game-development industry. The syntax is different from JavaScript, but both share many common semantics.", 0, 0, "Courier", 14)
test:setTextColor(255, 255, 255, 255)
test.y = display.stageHeight/2

Replies

Tom
User is online Online
Ansca Staff
Joined: 13 Jul 2010

The newText API does not wrap the text on the screen but it shouldn't do what it's doing. I logged it as bug #834 in our internal database.

-Tom

dknell
User offline. Last seen 20 weeks 6 days ago. Offline
Joined: 12 Aug 2010

Thanks Tom,

I was trying to use a modified version of Gilbert's "Scroll Content" code to scroll a long text object horizontally. Which is also acting kind of wonky. I will ask about that one in the developer forum. :)

Viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.