From acb96b565f02d2bdd212ff231eda04af6a2886fb Mon Sep 17 00:00:00 2001 From: igor Date: Thu, 11 Jan 2018 06:15:01 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B8=D0=BB=D0=B5=D0=BD=D1=8C=D0=BA?= =?UTF-8?q?=D0=B8=D0=B9=20=D0=BD=D0=B5=D0=B4=D0=BE=D1=87=D0=B5=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Applications.cfg | 2 +- lib/GUI.lua | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Applications.cfg b/Applications.cfg index 7f38ff70..133151fe 100644 --- a/Applications.cfg +++ b/Applications.cfg @@ -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", diff --git a/lib/GUI.lua b/lib/GUI.lua index 20d17b0e..02c5d043 100755 --- a/lib/GUI.lua +++ b/lib/GUI.lua @@ -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)