Hi,
I am making a login/register scene and so I made 2 display groups:
function scene:create(event) -- New player display group newPlayerGroup = display.newGroup(); sceneGroup:insert(newPlayerGroup); createUsernameField = native.newTextField(options) newPlayerGroup:insert(createUsernameField) -- Login display group loginGroup = display.newGroup(); sceneGroup:insert(loginGroup); loginUsernameField = native.newTextField(options) loginGroup:insert(loginUsernameField) loginPasswordField = native.newTextField(options) loginGroup:insert(loginPasswordField) end
Then I set loginGroup.isVisible = false on scene:show.
I also use two widget.newButton to call a function that toggles the visibility of the display groups but the textFields are always visible once they’re shown.
Should I use object:removeSelf() on the textFields?
How do I get the textFields to show/hide accordingly?
Thanks in advance!