I’ve taken over an old source which uses viewController.lua from 2010
Just wonder if I have to overhaul the whole project, the only problem seems to be ui.newButton text color for viewController.newTabBar. Any help for the option name is appreciated to save me a bunch of work. Thanks
Here’s the code where newTabBar() creates the buttons:
for i=1, #tabs do local tab = ui.newButton{ default = default[i], over = over[i], onRelease = onRelease, text = tabs[i], font = font, size = size, offset = offset -- \<--someoptionname={255,255,255} ? } tabBar:insert(tab) local numberOfTabs = #tabs local tabButtonWidth = tab.width local totalButtonWidth = tabButtonWidth \* numberOfTabs local tabSpacing = (screenW - totalButtonWidth)/(numberOfTabs+1) tab.x = math.floor(tab.width\*(i-1) + tabSpacing \* i + tab.width\*0.5 -(display.contentWidth/2)) if tabBG then tab.y = math.floor(tabBG.height) else tab.y = math.floor(tab.height) end tab.id = i end
If it may ring a bell.