Examples - Add Grid Size Up/Down Buttons
This commit is contained in:
parent
d11a47abc5
commit
76b0e68cf1
2 changed files with 42 additions and 10 deletions
|
|
@ -112,7 +112,19 @@ void addControls(Example ex) {
|
|||
..text = "Stop"
|
||||
..onClick.listen((e) {
|
||||
ex.loop.stop();
|
||||
})));
|
||||
}))
|
||||
..append(new ButtonElement()
|
||||
..text = "+"
|
||||
..onClick.listen((e) {
|
||||
ex.loop.game.changeGridSize(true);
|
||||
}))
|
||||
..append(new ButtonElement()
|
||||
..text = "-"
|
||||
..onClick.listen((e) {
|
||||
ex.loop.game.changeGridSize(false);
|
||||
}))
|
||||
);
|
||||
|
||||
|
||||
// Don't add controls which don't work anyways (for simple examples)
|
||||
if(examples.indexOf(ex) <= 1) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue