I can’t figure out how to get my text to stay left aligned after it is updated…
Here is my code…
[blockcode]
local button_1 = display.newImageRect(“blankbutton.png”, 64, 40);
button_1:setReferencePoint(display.TopLeftReferencePoint);
button_1.buttonString = “1”
button_1.buttonValue = 1
button_1.x = 17 ; button_1.y = 182.5;
local txt = display.newText(“0”,0,0, native.systemFont, 30*2);
txt.xScale = 0.5; txt.yScale = 0.5;
txt:setReferencePoint(display.CenterLeftReferencePoint);
txt.x = 100; txt.y = 55;
function button_1:touch(e)
if(e.phase == “ended”) then
txt.text = txt.text … self.buttonString
txt:setReferencePoint(display.CenterLeftReferencePoint);
txt.x = 100;
end
end
button_1:addEventListener(“touch”, button_1);
[/blockcode]
Any help would be appreciated… [import]uid: 61463 topic_id: 10566 reply_id: 310566[/import]