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

Side by Side Diff: sky/examples/game/lib/sprite_box.dart

Issue 1146923005: Fix gesture events in fn2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « sky/examples/fn2/container.dart ('k') | sky/examples/raw/ink_well.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 part of sprites; 1 part of sprites;
2 2
3 enum SpriteBoxTransformMode { 3 enum SpriteBoxTransformMode {
4 nativePoints, 4 nativePoints,
5 letterbox, 5 letterbox,
6 stretch, 6 stretch,
7 scaleToFit, 7 scaleToFit,
8 fixedWidth, 8 fixedWidth,
9 fixedHeight, 9 fixedHeight,
10 } 10 }
(...skipping 23 matching lines...) Expand all
34 _scheduleTick(); 34 _scheduleTick();
35 } 35 }
36 36
37 double get systemWidth => _systemWidth; 37 double get systemWidth => _systemWidth;
38 double get systemHeight => _systemHeight; 38 double get systemHeight => _systemHeight;
39 39
40 void performLayout() { 40 void performLayout() {
41 size = constraints.constrain(new Size.infinite()); 41 size = constraints.constrain(new Size.infinite());
42 } 42 }
43 43
44 void handlePointer(PointerEvent event) { 44 void handleEvent(Event event) {
45 switch (event.type) { 45 switch (event.type) {
46 case 'pointerdown': 46 case 'pointerdown':
47 print("pointerdown"); 47 print("pointerdown");
48 break; 48 break;
49 } 49 }
50 } 50 }
51 51
52 void paint(RenderNodeDisplayList canvas) { 52 void paint(RenderNodeDisplayList canvas) {
53 // Move to correct coordinate space before drawing 53 // Move to correct coordinate space before drawing
54 double scaleX = 1.0; 54 double scaleX = 1.0;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // Count the number of frames we've been running 130 // Count the number of frames we've been running
131 _numFrames += 1; 131 _numFrames += 1;
132 132
133 // Print frame rate 133 // Print frame rate
134 if (_numFrames % 60 == 0) print("delta: ${delta} fps: ${1.0/delta}"); 134 if (_numFrames % 60 == 0) print("delta: ${delta} fps: ${1.0/delta}");
135 135
136 _rootNode.update(delta); 136 _rootNode.update(delta);
137 _scheduleTick(); 137 _scheduleTick();
138 } 138 }
139 } 139 }
OLDNEW
« no previous file with comments | « sky/examples/fn2/container.dart ('k') | sky/examples/raw/ink_well.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698