mirror of https://github.com/axmolengine/axmol.git
Update ListViewEventType for Lua
This commit is contained in:
parent
e431d4f824
commit
1b2d389011
|
@ -492,3 +492,5 @@ ccui.LayoutType.linearVertical = ccui.LayoutType.VERTICAL
|
||||||
ccui.LayoutType.linearHorizontal = ccui.LayoutType.HORIZONTAL
|
ccui.LayoutType.linearHorizontal = ccui.LayoutType.HORIZONTAL
|
||||||
ccui.LayoutType.relative = ccui.LayoutType.RELATIVE
|
ccui.LayoutType.relative = ccui.LayoutType.RELATIVE
|
||||||
|
|
||||||
|
ccui.ListViewEventType.onsSelectedItem = ccui.ListViewEventType.ONSELECTEDITEM_START
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,8 @@ ccui.ListViewMoveDirection = {
|
||||||
}
|
}
|
||||||
|
|
||||||
ccui.ListViewEventType = {
|
ccui.ListViewEventType = {
|
||||||
onsSelectedItem = 0,
|
ONSELECTEDITEM_START = 0,
|
||||||
|
ONSELECTEDITEM_END = 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
ccui.PageViewEventType = {
|
ccui.PageViewEventType = {
|
||||||
|
|
|
@ -2425,7 +2425,7 @@ function UIListViewVerticalTest:initExtend()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function listViewEvent(sender, eventType)
|
local function listViewEvent(sender, eventType)
|
||||||
if eventType == ccui.ListViewEventType.onsSelectedItem then
|
if eventType == ccui.ListViewEventType.ONSELECTEDITEM_START then
|
||||||
print("select child index = ",sender:getCurSelectedIndex())
|
print("select child index = ",sender:getCurSelectedIndex())
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue