Hello !
(Sorry for my bad English)
I am a new Gideros developer, and I still do not know much.
I am using the "button.lua" module to create buttons, but I need buttons with texts over them.
I can not use images that already contain texts, because I will create an option to translate the app to
English, Portuguese and Spanish, and I do not want create three different images for each button.
I tried create objects with "TextField.new", but I am having troubles whit the position of the text,
when I change the text to English, Portugues or Spanish.
Furthermore, I need to reposition the buttons in certain situations, and the text must follow the position of the button
Is there a easy way to make a button with text ?
Thanks for your attention !
Paulo
Comments
you would require a similar sort of code where you can create the image background and then place text on it. Alternatively if your buttons are plain, then you can create rectangles and place text on it.
To make sure that the text follows the button, you need to place them all in the same sprite parent.
In many games developers do use buttons for each language the benefits are that you can have pre-rendered fonts and fx in the language of your choice vs plain text dynamically created.
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
remember import init file from :
https://github.com/ar2rsawseen/GiderosCodingEasy
to use setAnchorPoint method
Likes: CodeVanya
I will try yours ideas.
Paulo