Skip to content

Commit

Permalink
0.9.3 fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
playif committed Aug 24, 2014
1 parent 78d4f99 commit 363ed98
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions example/index.html
Expand Up @@ -16,8 +16,8 @@


<!--<textarea id="sourcecode" style="margin-top: 16px; width: 800px; height: 600px"></textarea>-->
<!--<select id="examples">
</select>-->
<select id="examples">
</select>

<script type="application/dart" src="main.dart"></script>
<script type="text/javascript" src="packages/browser/dart.js"></script>
Expand Down
30 changes: 15 additions & 15 deletions example/main.dart
Expand Up @@ -155,23 +155,23 @@ main() {

Game game = new Game(800, 480, WEBGL, '');

//dom.SelectElement select = dom.document.getElementById("examples") as dom.SelectElement;
//for (String key in examples.keys) {
// game.state.add(key, examples[key]);
//dom.OptionElement option = new dom.OptionElement();
//option.text = key;
//select.children.add(option);
//}
dom.SelectElement select = dom.document.getElementById("examples") as dom.SelectElement;
for (String key in examples.keys) {
game.state.add(key, examples[key]);
dom.OptionElement option = new dom.OptionElement();
option.text = key;
select.children.add(option);
}
//
//select.onChange.listen((dom.Event e) {
//game.state.start(select.children[select.selectedIndex].text);
//});
print("start 1");
game.state.add("games_02_gemmatch", new games_03_invaders());
game.state.start("games_02_gemmatch");
select.onChange.listen((dom.Event e) {
game.state.start(select.children[select.selectedIndex].text);
});
//print("start 1");
//game.state.add("games_02_gemmatch", new games_03_invaders());
game.state.start("basic_01_load_an_image");

//game.canvas.style.cursor = "pointer";
game.boot();
print("start");
//game.boot();
//print("start");

}

0 comments on commit 363ed98

Please sign in to comment.