From 1b2d389011d163017ec136fd2af3f676ba38b1e9 Mon Sep 17 00:00:00 2001 From: samuele3hu Date: Wed, 16 Jul 2014 17:18:01 +0800 Subject: [PATCH] Update ListViewEventType for Lua --- cocos/scripting/lua-bindings/script/DeprecatedEnum.lua | 2 ++ cocos/scripting/lua-bindings/script/GuiConstants.lua | 3 ++- .../src/CocoStudioTest/CocoStudioGUITest/CocoStudioGUITest.lua | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cocos/scripting/lua-bindings/script/DeprecatedEnum.lua b/cocos/scripting/lua-bindings/script/DeprecatedEnum.lua index 738f2a2014..fd21cc4ecb 100644 --- a/cocos/scripting/lua-bindings/script/DeprecatedEnum.lua +++ b/cocos/scripting/lua-bindings/script/DeprecatedEnum.lua @@ -492,3 +492,5 @@ ccui.LayoutType.linearVertical = ccui.LayoutType.VERTICAL ccui.LayoutType.linearHorizontal = ccui.LayoutType.HORIZONTAL ccui.LayoutType.relative = ccui.LayoutType.RELATIVE +ccui.ListViewEventType.onsSelectedItem = ccui.ListViewEventType.ONSELECTEDITEM_START + diff --git a/cocos/scripting/lua-bindings/script/GuiConstants.lua b/cocos/scripting/lua-bindings/script/GuiConstants.lua index e322d3bfaf..1b3ce7e439 100644 --- a/cocos/scripting/lua-bindings/script/GuiConstants.lua +++ b/cocos/scripting/lua-bindings/script/GuiConstants.lua @@ -151,7 +151,8 @@ ccui.ListViewMoveDirection = { } ccui.ListViewEventType = { - onsSelectedItem = 0, + ONSELECTEDITEM_START = 0, + ONSELECTEDITEM_END = 1, } ccui.PageViewEventType = { diff --git a/tests/lua-tests/src/CocoStudioTest/CocoStudioGUITest/CocoStudioGUITest.lua b/tests/lua-tests/src/CocoStudioTest/CocoStudioGUITest/CocoStudioGUITest.lua index bac936d12f..ecf355110c 100644 --- a/tests/lua-tests/src/CocoStudioTest/CocoStudioGUITest/CocoStudioGUITest.lua +++ b/tests/lua-tests/src/CocoStudioTest/CocoStudioGUITest/CocoStudioGUITest.lua @@ -2425,7 +2425,7 @@ function UIListViewVerticalTest:initExtend() end local function listViewEvent(sender, eventType) - if eventType == ccui.ListViewEventType.onsSelectedItem then + if eventType == ccui.ListViewEventType.ONSELECTEDITEM_START then print("select child index = ",sender:getCurSelectedIndex()) end end