443 Commits

Author SHA1 Message Date
Viktor Lidholt
a7ede89e93 Splits up demo game into multiple files for better readability 2015-08-26 10:22:09 -07:00
Viktor Lidholt
33f64444ad Updates demo game to work with new constraints api 2015-08-26 10:07:59 -07:00
Hixie
71e6f53a57 Replace Flex to Row and Column in tests and examples.
This still leaves Flex and FlexDirection available. At some point once
people have transitioned to Row/Column we should rename Flex to _Flex
and stop reexporting FlexDirection from basic.dart.
2015-08-26 09:05:14 -07:00
Collin Jackson
d8690b8cae Add date picker to widgets library and teach fitness app to use it
Also, add an example for the date picker
2015-08-25 16:41:11 -07:00
Ian Fischer
ed7c2d00c2 Merge pull request #840 from iansf/change_fitness_app_id
Change Fitness app id
2015-08-25 16:40:10 -07:00
Ian Fischer
80658a1585 Change Fitness bundle id to be compatible with signing with Google’s keys. 2015-08-25 16:24:28 -07:00
Viktor Lidholt
c46ff6f2f3 Merge pull request #835 from vlidholt/master
Moves sky sprites to its own package
2015-08-25 16:12:30 -07:00
Viktor Lidholt
872a1cbfa4 Moves sky sprites to its own package 2015-08-25 16:08:46 -07:00
Viktor Lidholt
51f3f7ea04 Merge pull request #826 from vlidholt/master
Updates to demo game
2015-08-25 15:33:49 -07:00
Viktor Lidholt
40e2693bf8 Fixes nits 2015-08-25 15:30:45 -07:00
Eric Seidel
909671106e Roll APK versions in preparation for releases
@abarth
2015-08-25 15:12:38 -07:00
Viktor Lidholt
ec4aaf2efd Adds swarms of enemies to demo game 2015-08-25 14:49:54 -07:00
Viktor Lidholt
0d0ee255fa Adds constraint for rotating a node towards another node 2015-08-25 14:47:56 -07:00
Viktor Lidholt
dbe555a42a Makes the spline tension editable in sprites 2015-08-25 14:45:44 -07:00
Eric Seidel
8de49db608 Make 'save failed' snackbar show up
SnackBar's crash if you fail to provide a showing bool.

I tried to edit it in the framework, but this seemed easier for now.

The snackbar still shows behind the keyboard unfortunately.
https://github.com/domokit/sky_engine/issues/810

@collinjackson
2015-08-25 13:39:27 -07:00
Eric Seidel
e76d3f9fd1 Move Fitness.app to the latest playfair
@collinjackson
2015-08-25 13:32:28 -07:00
Eric Seidel
9085b8ad44 Hack around Fitness.app crashing if it can't load data
I'm not sure this is the correct approach, but it
at least mitigates https://github.com/domokit/sky_engine/issues/804
for now.

I also made it not crash if you haven't set a goalWeight.

@collinjackson
2015-08-25 13:09:50 -07:00
Viktor Lidholt
6622c8cd3d Removes old code from demo game 2015-08-25 10:14:26 -07:00
Viktor Lidholt
cca7006d95 Removes custom joystick code and adds a new moving enemy to demo game 2015-08-25 09:28:58 -07:00
Viktor Lidholt
0257b37975 Adds base rotation property to rotate-to-movement constraint 2015-08-25 09:28:58 -07:00
Viktor Lidholt
4a6919c364 Adds virtual joystick to games library 2015-08-25 09:28:58 -07:00
Viktor Lidholt
bb0de38f5b Minor code cleanup 2015-08-24 16:41:05 -07:00
Viktor Lidholt
e5fb2b7187 Adds support for spline actions and constraints on nodes 2015-08-24 16:08:23 -07:00
Viktor Lidholt
c1b071c1ac New game demo, initial version 2015-08-24 16:07:25 -07:00
Adam Barth
d1537172bf Merge pull request #780 from abarth/mimic_improvements
Mimic should track Mimicable more completely
2015-08-24 15:11:34 -07:00
Adam Barth
3acbcbd375 Mimic should track Mimicable more completely
We now have Mimic tracking Mimicable through tree structure changes and while
moving around the screen.

Fixes #751 and #756
2015-08-24 15:11:18 -07:00
Hans Muller
384bcd70e9 Support ScrollableLists that wrap
Adds itemsWrap:bool (default false) to ScrollableList and PageableList. If itemsWrap is true then scrolling past the last item wraps around to the first. Similarly, scrolling before the first item wraps around to the last.

Added abstract ExtentScrollBehavior of ScrollBehavior. Renamed fields called contentsExtents to contentExtent, containerExtents to containerExtent, contentSize to contentExtent, etc.

BoundedBehavior is now a subclass of ExtentScrollBehavior.

Added UnboundedBehavior subclass of ExtentScrollBehvaior; contentExtent and maxScrollOffset are double.INFINITY, minScrollExtent is double.NEGATIVE_INFINITY.
2015-08-24 13:22:08 -07:00
Adam Barth
1db6f202b3 Address review comments from #767
Mostly formating and removing arguments with default values.
2015-08-22 11:25:53 -07:00
Adam Barth
131a0d6766 Merge pull request #767 from abarth/modernize_drawer_item
DrawerItem, DrawerHeader should take a child instead of children
2015-08-22 08:46:12 -07:00
Adam Barth
341728ce5f Fix analyzer warnings 2015-08-22 08:24:02 -07:00
Adam Barth
c1cc8b2099 DrawerItem, DrawerHeader should take a child instead of children
These widgets were designed in CSS where you need to specify a layout model for
your children. This patch updates them to the modern style of just taking a
unique child.

Fixes #755
2015-08-22 08:19:38 -07:00
Adam Barth
f140ec7aff Rename syncFields to syncConstructorArguments 2015-08-21 17:21:42 -07:00
Collin Jackson
47921c196f Merge pull request #747 from collinjackson/fitness_loading
Don’t flash a message while fitness data is loading
2015-08-21 16:21:05 -07:00
Adam Barth
c354abc7e0 Rename all the scrollable classes
Block -> BlockBody
ScrollableBlock -> Block
FixedHeightScrollable -> ScrollableWidgetList
VariableHeightScrollable -> ScrollableMixedWidgetList
BlockViewport -> MixedViewport
2015-08-21 14:39:41 -07:00
Adam Barth
13355a99b0 Add SetRequestedOrientation to Activity service
Fixes #743
2015-08-21 12:49:49 -07:00
Collin Jackson
65e6d44e09 Don’t flash a message while fitness data is loading 2015-08-21 11:19:26 -07:00
Adam Barth
f14976d3e4 Add the ability to draw borders on circles
We now support uniform borders on circular box decorations.

Fixes #741
2015-08-21 10:48:28 -07:00
Collin Jackson
49d7699b5c Add goal weight indicator line to fitness chart 2015-08-20 11:45:31 -07:00
Collin Jackson
46687c8ddd Merge pull request #713 from collinjackson/goalweight
Support for saving goal weight
2015-08-20 11:44:48 -07:00
Adam Barth
5b7e927bdc Merge pull request #714 from abarth/stack_squish
Stack squishes positioned elements near the edge
2015-08-20 11:25:35 -07:00
Adam Barth
937b5a2c85 Stack squishes positioned elements near the edge
When laying out positioned children inside a stack, we should give them
unbounded constraints because if they draw outside of the stack, we'll just
clip them.
2015-08-20 11:15:15 -07:00
Collin Jackson
3002f296a2 Support for goal weight saving 2015-08-20 11:02:00 -07:00
Collin Jackson
af433c5552 Merge pull request #691 from collinjackson/settings_save
Add support for saving settings in fitness app
2015-08-20 10:57:31 -07:00
Collin Jackson
deb648c19c Split fitness app’s UserData into UserData and UserDataImpl 2015-08-20 10:54:48 -07:00
Adam Barth
c16e03429c Key should be const
For great constness.

Fixes #693
2015-08-20 09:50:51 -07:00
Hans Muller
2e112e4317 Handle changes to scrollDirection in ScrollableList et al
Changed the pageable_list.dart example: tapping on the toolbar changes
the scroll direction. This exposed some problems:

- Scrollable.syncFields() didn't update scrollDirection
- Viewport updated its RenderObject fields in the wrong order
- FixedHeightScrollable scrollDirection changes didn't update the scrollBehavior

There may be similar problems with VariableHeightList and ScrollableViewport.
I will fix those in a separate CL.
2015-08-20 08:24:16 -07:00
Collin Jackson
47dc2cee19 Add support for saving settings in fitness app 2015-08-19 12:12:33 -07:00
Hans Muller
43c9017882 Dismissable: correct handling of a drag that ends with a fling 2015-08-19 10:48:26 -07:00
Hans Muller
8e465b4dce Adds PageableList, other scrolling related changes and fixes
- PageableList extends ScrollableList
One fixed width or height item is visible and centered at a
time. Fling and drag gestures scroll to the next/previous item.

- Scrollable.scrollTo(), Scrollable.scrollBy(), ensureWidgetIsVisible() API changed
The named animation parameter for these methods was replaced by
duration and curve. All of the methods now return a Future. The Future
completes when the scroll does.

This change eliminates the need for Scrollable to temporarily take ownership
of a ValueAnimation object (see #645).

- Using Future.then() instead of an AnimationPerformance status listener
In ensure_visible.dart _handleTap() uses ensureWidgetIsVisible() to
center the card roughly as before and then. When the implicit scroll
animation is complete, it changes the centered card's label font. The
change is made when the Future returned by ensureWidgetIsVisible()
completes.

- FixedHeightScrollable's itemHeight parameter is now itemExtent
If scrollDirection is ScrollDirection.vertical (the default) then itemExtent should
be the height of each item; otherwise it should be the width of each item.

Replaced _velocityForFlingGesture() in scrollable.dart with Scrollable._eventVelocity()
The original version clamped pixels/ms against pixels/sec constants. The new version
also deals with scrollDirection.

- Plumbed scrollDirection though FixedHeightScrollable and ScrollableList

Both classes should now support horizontal scrolling.
2015-08-19 10:14:21 -07:00
Adam Barth
7e5b6c96c7 Update playfair revision
... and reattach fitness to the build. We detached fitness from the build
because it was seeing an old version of playfair that didn't work with the most
recent version of the Sky package.
2015-08-19 09:05:30 -07:00