I am sorry if this is a bother, but I cannot figure out how to get my text object centered correctly!
Here is what I am doing:
--This acts as a backdrop for the "bubbleText" below.
speechBubble = display.newImageRect("talk-bubble.png", 180, 76)
speechBubble:setReferencePoint(display.CenterReferencePoint)
speechBubble.alpha = 0
GUIGroup:insert(speechBubble)
--This is the actual text object
bubbleText = display.newText(getSpeechInfo( thisCharacterID ).text, 0, 0, speechBubble.width, speechBubble.height, "Chantelli Antiqua", 12 )
bubbleText:setReferencePoint(display.CenterReferencePoint)
bubbleText.x = thisBubbleInfo.x + (speechBubble.contentWidth \* 0.5)
bubbleText.y = thisBubbleInfo.y + (speechBubble.contentHeight \* 0.5)
So the issue I am seeing is that the text object seems to be positioning using the top left corner, with the above code, I was trying to force it to be centered, but the top left corner of the text object is then positioned in the center of the backdrop image… Any ideas would be great [import]uid: 19620 topic_id: 28253 reply_id: 328253[/import]
[import]uid: 52491 topic_id: 28253 reply_id: 114276[/import]