I have several questions about the widget.newButton function. First, can you change the color of the button? If so, how? I couldn’t find anything on changing the color of widget buttons.
Also, this is a bug in my app. I have this code in the main.lua file to generate a back button for the rest of my code in my other .lua files:
function _G.createBackButton(grp)
grp:insert(widget.newButton{
left = display.contentWidth-60,
top = display.contentHeight+10,
label = “Back”, fontSize = 12,
width = 60, height = 30, cornerRadius = 8,
onEvent = function(e)
storyboard.gotoScene(“titleScene”,“fade”)
end
})
end
However it only creates the button for two out of the four scenes, even though I have the function called with self.view as an argument in the beginning of the :createScene() function. The two that don’t work have no other code in them besides the storyboard set up and calling the above function like so: createBackButton(self.view) inside of the :createScene() function.