Whats up guys! I’m back.
So I have a little problem. I am creating a mobile 2d game and I ran into problem. I have a “key” image and next to it (in left) a text that shows how many keys you have got.
So my problem is that when your key amount increases, the key text goes increasing step left (more than I want it to go). Here is an image addressing my problem:
And here is my code used to create both text and the key:
-- create key local key = display.newImage( "assets/key.png", x + w / 10 / 2, y - h / 2.7 ) key.width = w / 4 key.height = h / 15 view:insert( key ) settings.m.key = 4565 local goldScoreText = display.newText ( settings.m.key, x, key.y, font, h / 12 ) goldScoreText:setFillColor( 0, 0, 0 ) goldScoreText.x = x - goldScoreText.width - w / 35 view:insert( goldScoreText )
I hope you can help me with this thing, it is ok if you can’t but still thank you for coming see this post.
I hope you have a good day =)
Best regards
-Coder101