From 6fcc616c3563ebf429360b1d8f3c3f0a60742132 Mon Sep 17 00:00:00 2001 From: Erick Zanardo Date: Sun, 27 Sep 2020 14:48:52 -0300 Subject: [PATCH 1/7] Updating changelog to next iteration --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8da65e2bed0..b49a14803c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # CHANGELOG +## [next] + ## 0.27.0 - Improved the accuracy of the `FPSCounter` by using Flutter's internal frame timings. - Adding MouseMovementDetector From 2e9da8aa44e2eea828aba03b42be6fa91be49d51 Mon Sep 17 00:00:00 2001 From: Erick Zanardo Date: Sun, 27 Sep 2020 14:48:52 -0300 Subject: [PATCH 2/7] Updating changelog to next iteration --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8da65e2bed0..b49a14803c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # CHANGELOG +## [next] + ## 0.27.0 - Improved the accuracy of the `FPSCounter` by using Flutter's internal frame timings. - Adding MouseMovementDetector From 4b2344e3a8b0e7e329a48c5f77f37ba920ae5181 Mon Sep 17 00:00:00 2001 From: Renan Date: Sun, 4 Oct 2020 20:43:52 +0100 Subject: [PATCH 3/7] Fix deprecated message (#480) --- CHANGELOG.md | 1 + lib/util.dart | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b49a14803c6..5c732438ae6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # CHANGELOG ## [next] +- Fix spriteAsWidget deprecation message ## 0.27.0 - Improved the accuracy of the `FPSCounter` by using Flutter's internal frame timings. diff --git a/lib/util.dart b/lib/util.dart index fc2d83084b3..1e7b1de00e9 100644 --- a/lib/util.dart +++ b/lib/util.dart @@ -166,7 +166,7 @@ class Util { /// You can use this implementation as base to easily create your own widgets based on more complex games. /// This is intended to be used by non-game apps that want to add a sprite sheet animation. /// - @Deprecated('Use SpriteAnimation instead') + @Deprecated('Use AnimationWidget instead') widgets.Widget animationAsWidget(Position size, Animation animation) { return EmbeddedGameWidget( BaseGame()..add(AnimationComponent(size.x, size.y, animation)), From 42aafa6e518608bc6ed875d2a00ca899911f61ac Mon Sep 17 00:00:00 2001 From: Kazuki Date: Sun, 11 Oct 2020 23:02:01 -0700 Subject: [PATCH 4/7] Fix typo in issue template --- .github/issue_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/issue_template.md b/.github/issue_template.md index 5330fa1a6bb..a2349698693 100644 --- a/.github/issue_template.md +++ b/.github/issue_template.md @@ -10,7 +10,7 @@ Describe your issue here -## Development enviroment +## Development environment Flame version: From 5751dfa4d6897b9b93f7152f98c03a03bea301a2 Mon Sep 17 00:00:00 2001 From: Kazuki Nishiura Date: Sun, 18 Oct 2020 13:47:07 -0700 Subject: [PATCH 5/7] Add lineHeight property to TextConfig --- CHANGELOG.md | 1 + doc/text.md | 1 + lib/text_config.dart | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c732438ae6..10f2f9848a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## [next] - Fix spriteAsWidget deprecation message +- Add `lineHeight` property to `TextConfig` ## 0.27.0 - Improved the accuracy of the `FPSCounter` by using Flutter's internal frame timings. diff --git a/doc/text.md b/doc/text.md index 1938b40043b..1be99656712 100644 --- a/doc/text.md +++ b/doc/text.md @@ -14,6 +14,7 @@ const TextConfig config = TextConfig(fontSize: 48.0, fontFamily: 'Awesome Font') * fontFamily : a commonly available font, like Arial (default), or a custom font added in your pubspec (see [here](https://flutter.io/custom-fonts/) how to do it) * fontSize : font size, in pts (default `24.0`) +* lineHeight: height of text line, as a multiple of font size (default `null`) * color : the color, as a `ui.Color` (default black) For more information regarding colors and how to create then, see the [Colors and the Palette](/doc/palette.md) guide. diff --git a/lib/text_config.dart b/lib/text_config.dart index 433fd6c1755..7589762abf6 100644 --- a/lib/text_config.dart +++ b/lib/text_config.dart @@ -54,6 +54,9 @@ class TextConfig { /// For proper fonts of languages like Hebrew or Arabic, replace this with [TextDirection.rtl]. final TextDirection textDirection; + /// The height of line, as a multiple of font size. + final double lineHeight; + final MemoryCache _textPainterCache = MemoryCache(); @@ -66,6 +69,7 @@ class TextConfig { this.fontFamily = 'Arial', this.textAlign = TextAlign.left, this.textDirection = TextDirection.ltr, + this.lineHeight, }); /// Renders a given [text] in a given position [p] using the provided [canvas] and [anchor]. @@ -103,6 +107,7 @@ class TextConfig { color: color, fontSize: fontSize, fontFamily: fontFamily, + height: lineHeight, ); final material.TextSpan span = material.TextSpan( style: style, From e2448d2a8595de07581a9da90889e04200907a16 Mon Sep 17 00:00:00 2001 From: Tyemy Kuga Date: Wed, 21 Oct 2020 22:57:54 -0300 Subject: [PATCH 6/7] Adding pause and resume to timer --- CHANGELOG.md | 1 + lib/time.dart | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c732438ae6..9e6446b4de5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## [next] - Fix spriteAsWidget deprecation message +- Adding pause and resume methods to time class ## 0.27.0 - Improved the accuracy of the `FPSCounter` by using Flutter's internal frame timings. diff --git a/lib/time.dart b/lib/time.dart index 1fa3df0f21c..6f02bac7d12 100644 --- a/lib/time.dart +++ b/lib/time.dart @@ -48,6 +48,14 @@ class Timer { _running = false; } + void pause() { + _running = false; + } + + void resume() { + _running = true; + } + /// A value between 0 and 1 indicating the timer progress double get progress => _current / _limit; } From a35d4599fc5d794eb1ba95780fb543ccd2229637 Mon Sep 17 00:00:00 2001 From: renancaraujo Date: Tue, 27 Oct 2020 23:39:12 +0000 Subject: [PATCH 7/7] changelog for 0.28.0 --- CHANGELOG.md | 2 +- doc/README.md | 2 +- pubspec.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dda0e3ca0e3..2a61cd9fbf6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # CHANGELOG -## [next] +## 0.28.0 - Fix spriteAsWidget deprecation message - Add `lineHeight` property to `TextConfig` - Adding pause and resume methods to time class diff --git a/doc/README.md b/doc/README.md index eaa91e75898..88c330a0774 100644 --- a/doc/README.md +++ b/doc/README.md @@ -18,7 +18,7 @@ Put the pub package as your dependency by dropping the following in your `pubspe ```yaml dependencies: - flame: ^0.27.0 + flame: ^0.28.0 ``` And start using it! diff --git a/pubspec.yaml b/pubspec.yaml index ca0643a68a6..d639fab949a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flame description: A minimalist Flutter game engine, provides a nice set of somewhat independent modules you can choose from. -version: 0.27.0 +version: 0.28.0 homepage: https://github.com/flame-engine/flame dependencies: