Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(632)

Unified Diff: sky/sdk/example/game/main.dart

Issue 1225103009: Fix Asteroids game to paint again and give it an icon. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: updated Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sky/sdk/example/game/main.dart
diff --git a/sky/sdk/example/game/main.dart b/sky/sdk/example/game/main.dart
index f5e2de9fe94b47e71ad37e8bf0c40886563d51f1..2dd71a0503b9d02ae888590b05729fcfc209810d 100644
--- a/sky/sdk/example/game/main.dart
+++ b/sky/sdk/example/game/main.dart
@@ -3,8 +3,11 @@
// found in the LICENSE file.
import 'package:sky/mojo/asset_bundle.dart';
+import 'package:sky/theme/colors.dart' as colors;
import 'package:sky/widgets/basic.dart';
import 'package:sky/widgets/widget.dart';
+import 'package:sky/widgets/task_description.dart';
+import 'package:sky/widgets/theme.dart';
import 'lib/game_demo.dart';
import 'lib/sprites.dart';
@@ -40,23 +43,22 @@ main() async {
class GameDemoApp extends App {
Widget build() {
- return new Stack([
- new SpriteWidget(new GameDemoWorld(_app, _loader, _spriteSheet)),
-// new StackPositionedChild(
-// new Flex([
-// new FlexExpandingChild(
-// new RaisedButton(child:new Text("Hello")),
-// key: 1
-// ),
-// new FlexExpandingChild(
-// new RaisedButton(child:new Text("Foo!")),
-// key: 2
-// )
-// ]),
-// right:0.0,
-// top: 20.0
-// )
- ]);
+ // TODO(viktork): The task bar purple is the wrong purple, we may need
+ // a custom theme swatch to match the purples in the sprites.
+ ThemeData theme = new ThemeData(
+ brightness: ThemeBrightness.light,
+ primarySwatch: colors.Purple
+ );
+
+ return new Theme(
+ data: theme,
+ child: new TaskDescription(
+ label: 'Asteroids',
+ child: new SpriteWidget(
+ new GameDemoWorld(_app, _loader, _spriteSheet)
+ )
+ )
+ );
}
}

Powered by Google App Engine
This is Rietveld 408576698