topical media & game development
mobile-graphic-enchant-examples-plugins-widget-ListView-main.js / js
enchant();
window.onload = function() {
var game = new Game(320, 320);
game.onload = function() {
var navigationBar = new NavigationBar('NavigationBar'); // ナビゲーションバーを作成
game.rootScene.addChild(navigationBar);
/*
* new ListView(width, height, draggable)
* ListView オブジェクトを作成する。
* 横幅、縦幅、項目をドラッグ可能かを設定する。
*/
var listView = new ListView(320, 320 - navigationBar.height, true); // リストビューを作成
listView.y = navigationBar.height;
// 項目を10個作成する
for (var i = 0; i < 10; i++) {
var item = new ListItem(320, 48); // リストアイテムを作成
item.content = 'ListItem' + i;
listView.addChild(item); // リストビューに項目を追加
}
game.rootScene.addChild(listView);
};
game.start();
};
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.