mirror of https://github.com/axmolengine/axmol.git
sort the testcase by title.
This commit is contained in:
parent
8a8515e998
commit
89949248de
|
@ -114,6 +114,15 @@ var TestController = cc.LayerGradient.extend({
|
|||
menu.x = 0;
|
||||
menu.y = 0;
|
||||
|
||||
// sort the test title
|
||||
testNames.sort(function(first, second){
|
||||
if (first.title > second.title)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return -1;
|
||||
});
|
||||
|
||||
// add menu items for tests
|
||||
this._itemMenu = new cc.Menu();//item menu is where all the label goes, and the one gets scrolled
|
||||
|
||||
|
|
Loading…
Reference in New Issue