mirror of https://github.com/axmolengine/axmol.git
add more deprecated functions
This commit is contained in:
parent
00ad5bd620
commit
bc44769b8b
|
@ -66,5 +66,30 @@ var cc = cc || {};
|
||||||
return this.getItem(index);
|
return this.getItem(index);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ccui.PageView.prototype.setCustomScrollThreshold = function() {
|
||||||
|
cc.log("Since v3.9, this method has no effect.");
|
||||||
|
};
|
||||||
|
|
||||||
|
ccui.PageView.prototype.getCustomScrollThreshold = function() {
|
||||||
|
cc.log("Since v3.9, this method has no effect.");
|
||||||
|
};
|
||||||
|
|
||||||
|
ccui.PageView.prototype.setUsingCustomScrollThreshold = function() {
|
||||||
|
cc.log("Since v3.9, this method has no effect.");
|
||||||
|
};
|
||||||
|
|
||||||
|
ccui.PageView.prototype.isUsingCustomScrollThreshold = function() {
|
||||||
|
cc.log("Since v3.9, this method has no effect.");
|
||||||
|
};
|
||||||
|
|
||||||
|
ccui.ListView.prototype.requestRefreshView = function() {
|
||||||
|
logW("ccui.ListView.requestRefreshView", "ccui.ListView.forceDoLayout");
|
||||||
|
this.forceDoLayout();
|
||||||
|
};
|
||||||
|
|
||||||
|
ccui.ListView.prototype.refreshView = function() {
|
||||||
|
logW("ccui.ListView.refreshView", "ccui.ListView.forceDoLayout");
|
||||||
|
this.forceDoLayout();
|
||||||
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -162,31 +162,56 @@ function UIPageViewDeprecated.addEventListenerPageView(self,handler)
|
||||||
return self:addEventListener(handler)
|
return self:addEventListener(handler)
|
||||||
end
|
end
|
||||||
ccui.PageView.addEventListenerPageView = UIPageViewDeprecated.addEventListenerPageView
|
ccui.PageView.addEventListenerPageView = UIPageViewDeprecated.addEventListenerPageView
|
||||||
|
|
||||||
function UIPageViewDeprecated.addWidgetToPage(self, widget, pageIdx)
|
function UIPageViewDeprecated.addWidgetToPage(self, widget, pageIdx)
|
||||||
deprecatedTip("ccui.PageView:addWidgetToPage","ccui.PageView:insertPage")
|
deprecatedTip("ccui.PageView:addWidgetToPage","ccui.PageView:insertPage")
|
||||||
return self:insertPage(widget, pageIdx)
|
return self:insertPage(widget, pageIdx)
|
||||||
end
|
end
|
||||||
ccui.PageView.addWidgetToPage = UIPageViewDeprecated.addWidgetToPage
|
ccui.PageView.addWidgetToPage = UIPageViewDeprecated.addWidgetToPage
|
||||||
|
|
||||||
function UIPageViewDeprecated.getCurPageIndex(self)
|
function UIPageViewDeprecated.getCurPageIndex(self)
|
||||||
deprecatedTip("ccui.PageView:getCurPageIndex","ccui.PageView:getCurrentPageIndex")
|
deprecatedTip("ccui.PageView:getCurPageIndex","ccui.PageView:getCurrentPageIndex")
|
||||||
return self:getCurrentPageIndex()
|
return self:getCurrentPageIndex()
|
||||||
end
|
end
|
||||||
ccui.PageView.getCurPageIndex = UIPageViewDeprecated.getCurPageIndex
|
ccui.PageView.getCurPageIndex = UIPageViewDeprecated.getCurPageIndex
|
||||||
|
|
||||||
function UIPageViewDeprecated.setCurPageIndex(self, index)
|
function UIPageViewDeprecated.setCurPageIndex(self, index)
|
||||||
deprecatedTip("ccui.PageView:setCurPageIndex","ccui.PageView:setCurrentPageIndex")
|
deprecatedTip("ccui.PageView:setCurPageIndex","ccui.PageView:setCurrentPageIndex")
|
||||||
return self:setCurrentPageIndex(index)
|
return self:setCurrentPageIndex(index)
|
||||||
end
|
end
|
||||||
ccui.PageView.setCurPageIndex = UIPageViewDeprecated.setCurPageIndex
|
ccui.PageView.setCurPageIndex = UIPageViewDeprecated.setCurPageIndex
|
||||||
|
|
||||||
function UIPageViewDeprecated.getPages(self)
|
function UIPageViewDeprecated.getPages(self)
|
||||||
deprecatedTip("ccui.PageView:getPages","ccui.PageView:getItems")
|
deprecatedTip("ccui.PageView:getPages","ccui.PageView:getItems")
|
||||||
return self:getItems()
|
return self:getItems()
|
||||||
end
|
end
|
||||||
ccui.PageView.getPages = UIPageViewDeprecated.getPages
|
ccui.PageView.getPages = UIPageViewDeprecated.getPages
|
||||||
|
|
||||||
function UIPageViewDeprecated.getPage(self, index)
|
function UIPageViewDeprecated.getPage(self, index)
|
||||||
deprecatedTip("ccui.PageView:getPage","ccui.PageView:getItem")
|
deprecatedTip("ccui.PageView:getPage","ccui.PageView:getItem")
|
||||||
return self:getItem(index)
|
return self:getItem(index)
|
||||||
end
|
end
|
||||||
ccui.PageView.getPage = UIPageViewDeprecated.getPage
|
ccui.PageView.getPage = UIPageViewDeprecated.getPage
|
||||||
|
|
||||||
|
function UIPageViewDeprecated.setCustomScrollThreshold(self)
|
||||||
|
print("Since v3.9, this method has no effect.")
|
||||||
|
end
|
||||||
|
ccui.PageView.setCustomScrollThreshold = UIPageViewDeprecated.setCustomScrollThreshold
|
||||||
|
|
||||||
|
function UIPageViewDeprecated.getCustomScrollThreshold(self)
|
||||||
|
print("Since v3.9, this method has no effect.")
|
||||||
|
end
|
||||||
|
ccui.PageView.getCustomScrollThreshold = UIPageViewDeprecated.getCustomScrollThreshold
|
||||||
|
|
||||||
|
function UIPageViewDeprecated.isUsingCustomScrollThreshold(self)
|
||||||
|
print("Since v3.9, this method has no effect.")
|
||||||
|
end
|
||||||
|
ccui.PageView.isUsingCustomScrollThreshold = UIPageViewDeprecated.isUsingCustomScrollThreshold
|
||||||
|
|
||||||
|
function UIPageViewDeprecated.setUsingCustomScrollThreshold(self)
|
||||||
|
print("Since v3.9, this method has no effect.")
|
||||||
|
end
|
||||||
|
ccui.PageView.setUsingCustomScrollThreshold = UIPageViewDeprecated.setUsingCustomScrollThreshold
|
||||||
--functions of ccui.PageView will be deprecated end
|
--functions of ccui.PageView will be deprecated end
|
||||||
|
|
||||||
--functions of ccui.ScrollView will be deprecated begin
|
--functions of ccui.ScrollView will be deprecated begin
|
||||||
|
@ -205,4 +230,16 @@ function UIListViewDeprecated.addEventListenerListView(self,handler)
|
||||||
return self:addEventListener(handler)
|
return self:addEventListener(handler)
|
||||||
end
|
end
|
||||||
ccui.ListView.addEventListenerListView = UIListViewDeprecated.addEventListenerListView
|
ccui.ListView.addEventListenerListView = UIListViewDeprecated.addEventListenerListView
|
||||||
|
|
||||||
|
function UIListViewDeprecated.requestRefreshView(self)
|
||||||
|
deprecatedTip("ccui.ListView:requestRefreshView","ccui.ListView:forceDoLayout")
|
||||||
|
return self:forceDoLayout()
|
||||||
|
end
|
||||||
|
ccui.ListView.requestRefreshView = UIListViewDeprecated.requestRefreshView
|
||||||
|
|
||||||
|
function UIListViewDeprecated.refreshView(self)
|
||||||
|
deprecatedTip("ccui.ListView:refreshView","ccui.ListView:refreshView")
|
||||||
|
return self:forceDoLayout()
|
||||||
|
end
|
||||||
|
ccui.ListView.refreshView = UIListViewDeprecated.refreshView
|
||||||
--functions of ccui.ListView will be deprecated end
|
--functions of ccui.ListView will be deprecated end
|
||||||
|
|
|
@ -136,6 +136,7 @@ var UIListViewTest_Vertical = UIMainLayer.extend({
|
||||||
|
|
||||||
// set all items layout gravity
|
// set all items layout gravity
|
||||||
listView.setGravity(ccui.ListView.GRAVITY_CENTER_VERTICAL);
|
listView.setGravity(ccui.ListView.GRAVITY_CENTER_VERTICAL);
|
||||||
|
listView.requestRefreshView();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue