mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 03:15:43 +08:00
Add hoverables (#797)
This commit is contained in:
@ -4,6 +4,7 @@ import 'package:flame/game.dart';
|
||||
import '../../commons/commons.dart';
|
||||
import 'advanced_joystick.dart';
|
||||
import 'draggables.dart';
|
||||
import 'hoverables.dart';
|
||||
import 'joystick.dart';
|
||||
import 'keyboard.dart';
|
||||
import 'mouse_movement.dart';
|
||||
@ -55,16 +56,18 @@ void addControlsStories(Dashbook dashbook) {
|
||||
(context) {
|
||||
return GameWidget(
|
||||
game: DraggablesGame(
|
||||
zoom: context.listProperty(
|
||||
'zoom',
|
||||
1,
|
||||
[0.5, 1, 1.5],
|
||||
),
|
||||
zoom: context.listProperty('zoom', 1, [0.5, 1, 1.5]),
|
||||
),
|
||||
);
|
||||
},
|
||||
codeLink: baseLink('controls/draggables.dart'),
|
||||
)
|
||||
..add(
|
||||
'Hoverables',
|
||||
(_) => GameWidget(game: HoverablesGame()),
|
||||
codeLink: baseLink('controls/hoverables.dart'),
|
||||
info: 'Add more squares by clicking. Hover squares to change colors.',
|
||||
)
|
||||
..add(
|
||||
'Joystick',
|
||||
(_) => GameWidget(game: JoystickGame()),
|
||||
|
||||
Reference in New Issue
Block a user