mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 20:13:50 +08:00
Updated the widgets docs (#628)
Co-authored-by: Erick <erickzanardoo@gmail.com>
This commit is contained in:
committed by
GitHub
parent
11d93c23b2
commit
9890ad73ed
@ -12,6 +12,7 @@
|
|||||||
- Adding shortcut for loading Sprites and SpriteAnimation from the global cache
|
- Adding shortcut for loading Sprites and SpriteAnimation from the global cache
|
||||||
- Adding loading methods for the different `ParallaxComponent` parts and refactor how the delta velocity works
|
- Adding loading methods for the different `ParallaxComponent` parts and refactor how the delta velocity works
|
||||||
- Add tests for `Timer` and fix a bug where `progress` was not reported correctly
|
- Add tests for `Timer` and fix a bug where `progress` was not reported correctly
|
||||||
|
- Updated the `widgets.md` documentation
|
||||||
|
|
||||||
## 1.0.0-rc5
|
## 1.0.0-rc5
|
||||||
- Option for overlays to be already visible on the GameWidget
|
- Option for overlays to be already visible on the GameWidget
|
||||||
|
|||||||
@ -125,7 +125,7 @@ void main() async {
|
|||||||
to: 3,
|
to: 3,
|
||||||
loop: true,
|
loop: true,
|
||||||
);
|
);
|
||||||
dashbook.storiesOf('AnimationWidget').decorator(CenterDecorator()).add(
|
dashbook.storiesOf('SpriteAnimationWidget').decorator(CenterDecorator()).add(
|
||||||
'default',
|
'default',
|
||||||
(ctx) => Container(
|
(ctx) => Container(
|
||||||
width: ctx.numberProperty('container width', 400),
|
width: ctx.numberProperty('container width', 400),
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
# Widgets
|
# Widgets
|
||||||
|
|
||||||
One cool feature when developing games with Flutter is the ability to use Flutter's extensive toolset for building UIs, Flame tries to expand that introducing widgets which are specially made with games in mind.
|
One cool feature when developing games with Flutter is the ability to use Flutter's extensive toolset for building UIs, Flame tries to expand on that by introducing widgets that are made with games in mind.
|
||||||
|
|
||||||
Here you can find all the available widgets provided by Flame.
|
Here you can find all the available widgets provided by Flame.
|
||||||
|
|
||||||
@ -57,21 +57,20 @@ How to use it:
|
|||||||
```dart
|
```dart
|
||||||
SpriteWidget(
|
SpriteWidget(
|
||||||
sprite: shieldSprite,
|
sprite: shieldSprite,
|
||||||
center: true,
|
anchor: Anchor.center,
|
||||||
),
|
)
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## AnimationWidget
|
## SpriteAnimationWidget
|
||||||
|
|
||||||
`AnimationWidget` is a widget used to display [Animations](https://github.com/flame-engine/flame/blob/master/lib/animation.dart) inside a widget tree.
|
`SpriteAnimationWidget` is a widget used to display [SpriteAnimations](https://github.com/flame-engine/flame/blob/master/lib/sprite_animation.dart) inside a widget tree.
|
||||||
|
|
||||||
How to use it:
|
How to use it:
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
AnimationWidget(
|
SpriteAnimationWidget(
|
||||||
animation: _animation,
|
animation: _animation,
|
||||||
playing: true,
|
playing: true,
|
||||||
center: true,
|
anchor: Anchor.center,
|
||||||
),
|
)
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user