Well if you want to use native TextFields, you would have to create plugins for all platforms you would want to support.
Other option would be to create a button with text "set username" and then open TextInputDialog on click, where user could enter username, then you can store this input in a variable and use where ever you want.
Example would be:
local currentUsername =""local text = TextField.new(nil, "Set your username")local setUsernameBtn = Button.new(text, text)
setUsernameBtn:addEventListener("click", function()local textInputDialog = TextInputDialog.new("Set Your Username", "Input your username here", "unknown", "Cancel", "OK")localfunction onComplete(event)if event.buttonIndex then
currentUsername = event.text
endend
textInputDialog:addEventListener(Event.COMPLETE, onComplete)
textInputDialog:show()end)--currentUsername now contains input username
@ljp1203, Gideros doesn't support a native text field that is portable across platforms. @ar2rsawseen's suggestion is the closest you can come right now. However, if you are on iOS only then you can use my Hot Wax plugin and add in whatever native fields that you like. See Hot Wax on my blog. And also this video:
Obviously, you don't have to to the physics stuff if you don't need it.
@ljp1203, did you add the UIKit and other things while building the Gideros player? It has to be then run on the device or the xcode simulator, it will not work on the Gideros Desktop Player.
If you would share how it failed i.e. what the error message was, you could get some help in fixing it.
@ljp1203, did you make sure that the GiderosIOSPlayer target was checked when you added the files to the XCode project? Go through each of the .m files and check this:
Now I have another question. I have developed my app to the point of where I will start to need Plugins such as Wax or UIKit. How would I implement these into my existing project? Do I have to export the project?
If you can, can you give me step by step directions because I am still new to the Plugins part of Gideros
Comments
Other option would be to create a button with text "set username" and then open TextInputDialog on click, where user could enter username, then you can store this input in a variable and use where ever you want.
Example would be:
Obviously, you don't have to to the physics stuff if you don't need it.
best regards
I followed you tutorial on YouTube, but I keep getting build failed, and I can't seem to find the cause. I followed the tutorial exactly.
Thanks!
-Landon
Lead Coder and Designer
If you would share how it failed i.e. what the error message was, you could get some help in fixing it.
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
I've attached screenshots with the files I've added, and also the errors i am getting. Thanks and hopefully you can help me with this!
Thanks!
-Landon
Lead Coder and Designer
https://dl.dropbox.com/u/2242074/2012-10-16_09-06-28.png
best regards
Thanks for the replies!
Now I have another question. I have developed my app to the point of where I will start to need Plugins such as Wax or UIKit. How would I implement these into my existing project? Do I have to export the project?
If you can, can you give me step by step directions because I am still new to the Plugins part of Gideros
Thanks!
-Landon
Lead Coder and Designer