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

Side by Side Diff: samples/pop-pop-win/lib/src/canvas/score_element.dart

Issue 200723008: samples/poppopwin: upgrade to first-class sample (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 part of ppw_canvas; 1 part of ppw_canvas;
2 2
3 // NOTE: setGameManager must be called immediately after construction 3 // NOTE: setGameManager must be called immediately after construction
4 4
5 class ScoreElement extends Thing { 5 class ScoreElement extends Thing {
6 static const _bombsLeftStr = "BOMBS LEFT:"; 6 static const _bombsLeftStr = "BOMBS LEFT:";
7 static const _valueOffset = 15; 7 static const _valueOffset = 15;
8 8
9 GameManager _gameManager; 9 GameManager _gameManager;
10 10
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 num _getTextSize(CanvasRenderingContext2D ctx) { 84 num _getTextSize(CanvasRenderingContext2D ctx) {
85 if(_textSize == null) { 85 if(_textSize == null) {
86 final mets = ctx.measureText(_bombsLeftStr); 86 final mets = ctx.measureText(_bombsLeftStr);
87 _textSize = mets.width; 87 _textSize = mets.width;
88 } 88 }
89 return _textSize; 89 return _textSize;
90 } 90 }
91 91
92 Game get _game => _gameManager.game; 92 Game get _game => _gameManager.game;
93 } 93 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698