Just started developing with Corona, good times!
I’m making a business app and I’ve got my title bar at the top, it’s a tabbed setup.
I’ve got my title bar set up on the main.lua file, my screens are in separate lua files (view1.lua, view2.lua), on each screen I want to change the title text.
Do I need to remove the text each screen or can I change the text content?
Thanks in advance!
Some code:
[lua]-- TITLE BAR
– create a gradient for the top-half of the toolbar
local toolbarGradient = graphics.newGradient( {168, 181, 198, 255 }, {139, 157, 180, 255}, “down” )
– create toolbar to go at the top of the screen
local titleBar = widget.newTabBar{
top = sbHeight,
gradient = toolbarGradient,
bottomFill = { 117, 139, 168, 255 },
height = 44
}
– create embossed text to go on titlebar
local titleText = display.newEmbossedText( “Test text”, 0, 0, native.systemFontBold, 20 )
titleText:setReferencePoint( display.CenterReferencePoint )
titleText:setTextColor( 255 )
titleText.x = 160
titleText.y = titleBar.y
– create a shadow underneath the titlebar (for a nice touch)
local shadow = display.newImage( “assets/shadow.png” )
shadow:setReferencePoint( display.TopLeftReferencePoint )
shadow.x, shadow.y = 0, top
shadow.xScale = 320 / shadow.contentWidth
shadow.alpha = 0.45
– END TITLE BAR [/lua] [import]uid: 163104 topic_id: 28573 reply_id: 328573[/import]