Hi,
I can’t get newRetinaText behave the same way newText does.
Here we can see the difference:
http://dl.dropbox.com/u/1716912/temp/retina.jpg
The code:
self.pointsText = display.newText("0 Points", 0, 0, fontName, fontSize)
self.timeText = display.newText(LEVEL\_PROPERTY.levelTime.." seconds left", 0, 0, fontName, fontSize)
self.levelText = display.newText("Level 1", 0, 0, fontName, fontSize)
self.pointsText:setReferencePoint(display.CenterLeftReferencePoint)
self.timeText:setReferencePoint(display.CenterLeftReferencePoint)
self.levelText:setReferencePoint(display.CenterLeftReferencePoint)
self.pointsText.x = self.leftTextOffset; self.pointsText.y = 20
self.timeText.x = self.leftTextOffset; self.timeText.y = 40
self.levelText.x = self.leftTextOffset; self.levelText.y = 60
and in each frame:
[code] self.pointsText.text = self.points…" Points ("…LEVEL_PROPERTY.nextLevelAt…", “…self.multiplier…”)"
self.timeText.text = “Remaining time: “…(string.format(”%.0f”, self.timeRemaining))
self.levelText.text = "Level: "…self.level
self.timeText:setReferencePoint(display.CenterLeftReferencePoint)
self.pointsText:setReferencePoint(display.CenterLeftReferencePoint)
self.levelText:setReferencePoint(display.CenterLeftReferencePoint)
self.timeText.x = self.leftTextOffset;
self.pointsText.x = self.leftTextOffset;
self.levelText.x = self.leftTextOffset;
self.timeText:toFront()
self.pointsText:toFront()
self.levelText:toFront()[/code]
The only thing I changed was the initial creation with either newRetinaText (top image) or newText (lower image).
I can’t explain why newRetinaText gives so strange results. Note that the the position of the red line (which is drawn afterwards with paint) changes all the time as the text changes, which shouldn’t happen. [import]uid: 68079 topic_id: 23443 reply_id: 323443[/import]