From 04ebba425f88960c6ef60a282d3519a0887bcccf Mon Sep 17 00:00:00 2001 From: Naoyuki Totani Date: Sat, 7 May 2016 16:23:23 +0900 Subject: [PATCH] add missing lua const values --- .../lua-bindings/script/framework/extends/UIListView.lua | 4 ++++ .../lua-bindings/script/framework/extends/UIScrollView.lua | 4 ++++ cocos/scripting/lua-bindings/script/ui/DeprecatedUIEnum.lua | 2 ++ cocos/scripting/lua-bindings/script/ui/GuiConstants.lua | 2 ++ 4 files changed, 12 insertions(+) diff --git a/cocos/scripting/lua-bindings/script/framework/extends/UIListView.lua b/cocos/scripting/lua-bindings/script/framework/extends/UIListView.lua index cab47a935c..a9f7f1ef32 100644 --- a/cocos/scripting/lua-bindings/script/framework/extends/UIListView.lua +++ b/cocos/scripting/lua-bindings/script/framework/extends/UIListView.lua @@ -60,6 +60,10 @@ function ListView:onScroll(callback) event.name = "BOUNCE_LEFT" elseif eventType == 8 then event.name = "BOUNCE_RIGHT" + elseif eventType == 9 then + event.name = "CONTAINER_MOVED" + elseif eventType == 10 then + event.name = "AUTOSCROLL_ENDED" end event.target = sender callback(event) diff --git a/cocos/scripting/lua-bindings/script/framework/extends/UIScrollView.lua b/cocos/scripting/lua-bindings/script/framework/extends/UIScrollView.lua index 601faf936b..0fd4c69f51 100644 --- a/cocos/scripting/lua-bindings/script/framework/extends/UIScrollView.lua +++ b/cocos/scripting/lua-bindings/script/framework/extends/UIScrollView.lua @@ -46,6 +46,10 @@ function ScrollView:onEvent(callback) event.name = "BOUNCE_LEFT" elseif eventType == 8 then event.name = "BOUNCE_RIGHT" + elseif eventType == 9 then + event.name = "CONTAINER_MOVED" + elseif eventType == 10 then + event.name = "AUTOSCROLL_ENDED" end event.target = sender callback(event) diff --git a/cocos/scripting/lua-bindings/script/ui/DeprecatedUIEnum.lua b/cocos/scripting/lua-bindings/script/ui/DeprecatedUIEnum.lua index ae7d63f964..219d4db4cc 100644 --- a/cocos/scripting/lua-bindings/script/ui/DeprecatedUIEnum.lua +++ b/cocos/scripting/lua-bindings/script/ui/DeprecatedUIEnum.lua @@ -59,6 +59,8 @@ SCROLLVIEW_EVENT_BOUNCE_TOP = ccui.ScrollviewEventType.bounceTop SCROLLVIEW_EVENT_BOUNCE_BOTTOM = ccui.ScrollviewEventType.bounceBottom SCROLLVIEW_EVENT_BOUNCE_LEFT = ccui.ScrollviewEventType.bounceLeft SCROLLVIEW_EVENT_BOUNCE_RIGHT = ccui.ScrollviewEventType.bounceRight +SCROLLVIEW_EVENT_CONTAINER_MOVED = ccui.ScrollviewEventType.containerMoved +SCROLLVIEW_EVENT_AUTOSCROLL_ENDED = ccui.ScrollviewEventType.autoscrollEnded PAGEVIEW_EVENT_TURNING = ccui.PageViewEventType.turning diff --git a/cocos/scripting/lua-bindings/script/ui/GuiConstants.lua b/cocos/scripting/lua-bindings/script/ui/GuiConstants.lua index 3a522ffa40..58bdd6358e 100644 --- a/cocos/scripting/lua-bindings/script/ui/GuiConstants.lua +++ b/cocos/scripting/lua-bindings/script/ui/GuiConstants.lua @@ -152,6 +152,8 @@ ccui.ScrollviewEventType = { bounceBottom = 6, bounceLeft = 7, bounceRight = 8, + containerMoved = 9, + autoscrollEnded = 10, } ccui.ListViewDirection = {