When I use the .rotation command on my tabBar, the command is executed visually although there is a problem capturing the button touch events. When the tabBar is rotated 180 deg the touch events appear to have not updated. The issue is complicated further for 90/45 deg commands.
To provide some context, I plan to update composer scenes using the tabBar. On an orientation change I plan to re-position and rotate the tabBar. I am using build version 2511, code below:
– Function to handle button events
local function handleTabBarEvent( event )
print( event.target._id ) --reference to button’s ‘id’ parameter
end
– Configure the tab buttons to appear within the bar
I’m pretty sure you can’t rotate the tabBar and get the proper touch responses, because the tabBar detects which tab was pressed based on the position/width of the tabs, not on each tab as an “object”. If you want this kind of functionality, you may consider building your own “tab bar” using widget “radio button” switches arranged in a row, and visually customize them so that they look like tabs instead of circular radio buttons. Then, I believe you could rotate the entire display group that contains them, and the touch should be detected in the proper location no matter how the display group is rotated.
I was thinking about the destroy/recreate option although my master plan is to update the tabBar in response to orientation changes. Would this present problems when in landscape Left/Right orientation - 90 deg rotation required?
I’m pretty sure you can’t rotate the tabBar and get the proper touch responses, because the tabBar detects which tab was pressed based on the position/width of the tabs, not on each tab as an “object”. If you want this kind of functionality, you may consider building your own “tab bar” using widget “radio button” switches arranged in a row, and visually customize them so that they look like tabs instead of circular radio buttons. Then, I believe you could rotate the entire display group that contains them, and the touch should be detected in the proper location no matter how the display group is rotated.
I was thinking about the destroy/recreate option although my master plan is to update the tabBar in response to orientation changes. Would this present problems when in landscape Left/Right orientation - 90 deg rotation required?