Миленький недочет

This commit is contained in:
igor 2018-01-11 06:15:01 +03:00
parent 3b7ea846f2
commit acb96b565f
2 changed files with 4 additions and 4 deletions

View File

@ -319,7 +319,7 @@
url="https://raw.githubusercontent.com/IgorTimofeev/OpenComputers/master/lib/GUI.lua",
type="Library",
preloadFile=true,
version=2.10,
version=2.11,
},
{
path="/lib/rayEngine.lua",

View File

@ -3462,6 +3462,7 @@ local function tabBarDraw(tabBar)
tabBar.children[i].colors.pressed.background = tabBar.colors.selected.background
tabBar.children[i].colors.pressed.text = tabBar.colors.selected.text
tabBar.children[i].localX = x
tabBar.children[i].pressed = tabBar.selectedItem == i - 1
x = x + tabBar.children[i].width + tabBar.spaceBetweenTabs
end
@ -3474,12 +3475,11 @@ local function tabBarDraw(tabBar)
return tabBar
end
local function tabBarTabEventHandler(mainContainer, tabBarTab, eventData)
if eventData[1] == "touch" then
tabBarTab.parent.selectedItem = tabBarTab:indexOf() - 1
for i = 2, #tabBarTab.parent.children do
tabBarTab.parent.children[i].pressed = tabBarTab.parent.selectedItem == i - 1
end
callMethod(tabBarTab.onTouch, mainContainer, tabBarTab, eventData)