Merge branch 'feat/chrome-dino-bonus' of https://github.com/VGVentures/pinball into feat/chrome-dino-bonus

pull/301/head
Allison Ryan 3 years ago
commit 93c2c496b6

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:pinball/game/pinball_game.dart'; import 'package:pinball/game/pinball_game.dart';
import 'package:pinball/l10n/l10n.dart'; import 'package:pinball/l10n/l10n.dart';
import 'package:pinball/select_character/select_character.dart'; import 'package:pinball/select_character/select_character.dart';
import 'package:pinball_ui/pinball_ui.dart';
/// {@template play_button_overlay} /// {@template play_button_overlay}
/// [Widget] that renders the button responsible to starting the game /// [Widget] that renders the button responsible to starting the game
@ -20,14 +21,12 @@ class PlayButtonOverlay extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final l10n = context.l10n; final l10n = context.l10n;
return Center( return PinballButton(
child: ElevatedButton( text: l10n.play,
onPressed: () async { onTap: () async {
_game.gameFlowController.start(); _game.gameFlowController.start();
await showCharacterSelectionDialog(context); await showCharacterSelectionDialog(context);
}, },
child: Text(l10n.play),
),
); );
} }
} }

@ -36,7 +36,7 @@ class Kicker extends BodyComponent with InitialPosition {
}) : _side = side, }) : _side = side,
super( super(
children: [ children: [
BumpingBehavior(strength: 20)..applyTo(['bouncy_edge']), BumpingBehavior(strength: 25)..applyTo(['bouncy_edge']),
KickerBallContactBehavior()..applyTo(['bouncy_edge']), KickerBallContactBehavior()..applyTo(['bouncy_edge']),
KickerBlinkingBehavior(), KickerBlinkingBehavior(),
_KickerSpriteGroupComponent( _KickerSpriteGroupComponent(

@ -21,26 +21,29 @@ class PinballButton extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return DecoratedBox( return Material(
decoration: BoxDecoration( color: PinballColors.transparent,
image: DecorationImage( child: DecoratedBox(
image: AssetImage(Assets.images.button.pinballButton.keyName), decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(Assets.images.button.pinballButton.keyName),
),
), ),
), child: Center(
child: Center( child: InkWell(
child: InkWell( onTap: onTap,
onTap: onTap, child: Padding(
child: Padding( padding: const EdgeInsets.symmetric(
padding: const EdgeInsets.symmetric( horizontal: 32,
horizontal: 32, vertical: 16,
vertical: 16, ),
), child: Text(
child: Text( text,
text, style: Theme.of(context)
style: Theme.of(context) .textTheme
.textTheme .headline3!
.headline3! .copyWith(color: PinballColors.white),
.copyWith(color: PinballColors.white), ),
), ),
), ),
), ),

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 917 B

Loading…
Cancel
Save