Hello. I am totally new to Corona.
Given the following code, I would like to center the menu items but not the line.
But if I use group_menu.x = display.contentCenterX the line is also centered.
How do I center just the menu items?
Any other code improving tips would be welcome as well.
local group\_title = display.newGroup() local title = display.newText( "TITLE", 0, 0, native.systemFont, 16 ) title.x = display.contentCenterX title.y = 0 title:setFillColor( 0, .7, 0 ) title.anchorX = .5 local title\_line = display.newLine(0, 16, display.contentWidth, 16) title\_line.anchorX = 0 group\_title.anchorX = 0 group\_title.anchorY = 0 group\_title.anchorChildren = true group\_title:insert(title) group\_title:insert(title\_line) local group\_menu = display.newGroup() local menu\_file = display.newText("File", 0,0,native.systemFont,16) menu\_file.anchorX = 0 menu\_file.x = 10 menu\_file.y = 0 menu\_file:setFillColor( .8, .3, 0 ) local menu\_windows = display.newText("Wins", 0,0,native.systemFont,16) menu\_windows.anchorX = 0 menu\_windows.x = menu\_file.x + 40 menu\_windows.y = 0 menu\_windows:setFillColor( .8, .3, 0 ) local menu\_doors = display.newText("Doors", 0,0,native.systemFont,16) menu\_doors.anchorX = 0 menu\_doors.x = menu\_windows.x + 50 menu\_doors.y = 0 menu\_doors:setFillColor( .8, .3, 0 ) local menu\_base = display.newText("Base", 0,0,native.systemFont,16) menu\_base.anchorX = 0 menu\_base.x = menu\_doors.x + 55 menu\_base.y = 0 menu\_base:setFillColor( .8, .3, 0 ) local menu\_misc = display.newText("Misc", 0,0,native.systemFont,16) menu\_misc.anchorX = 0 menu\_misc.x = menu\_base.x + 50 menu\_misc.y = 0 menu\_misc:setFillColor( .8, .3, 0 ) local menu\_line = display.newLine(0, 16, display.contentWidth, 16) menu\_line.anchorX = 0 group\_menu:insert(menu\_file) group\_menu:insert(menu\_windows) group\_menu:insert(menu\_doors) group\_menu:insert(menu\_base) group\_menu:insert(menu\_misc) group\_menu:insert(menu\_line) group\_menu.anchorX = .5 group\_menu.x = 0 group\_menu.y = group\_title.y + 40