Hi!
So I am converting an older project from widgets v.1 to v.2 and getting close to having things up and running like it should. However the tabBar is acting weird. I have a custom file for it and for buttons but the buttons dont center on the tabBar like it used to. Now they are placed slightly above the center.
Is this supposed to be? I have tried alot of things but nothing seem to work. The select graphics are centered on the tabBar where the button should have been, but the button is not. And as far as I can see there are no ways of adjusting the placement of the buttons?
code with tabBar looks like this:
[lua]
local btnWidth = 100
local btnHeight = 70
local tabButtons = {
{
defaultFile=“assets/tasks.png”,
overFile=“assets/tasks-down.png”,
width = btnWidth,
height = btnHeight,
onPress=function()
--call function
end,
selected=true,
},
{
defaultFile=“assets/goals.png”,
overFile=“assets/goals-down.png”,
width = btnWidth,
height = btnHeight,
onPress=function()
--call function
end,
},
{
defaultFile=“assets/info.png”,
overFile=“assets/info-down.png”,
width = btnWidth,
height = btnHeight,
onPress=function()
--call function
end,
},
}
local bottomTab = widget.newTabBar
{
left = 0,
top = display.contentHeight-70,
width = display.contentWidth,
height = 70,
buttons=tabButtons,
backgroundFile = “assets/tab_bck.png”,
tabSelectedLeftFile = “assets/tabBar_tabSelectedLeft.png”,
tabSelectedRightFile = “assets/tabBar_tabSelectedRight.png”,
tabSelectedMiddleFile = “assets/tabBar_tabSelectedMiddle.png”,
tabSelectedFrameWidth = 20,
tabSelectedFrameHeight = 52,
}
[/lua]