diff --git a/android/gradle.properties b/android/gradle.properties index 7f924def6fbe9a6322f047c8511363349ba0baf1..9672aaa070a22a3c358c043e5e9035ae445ef7d7 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1,5 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true -app.versionName=1.2.17 -app.versionCode=28 +app.versionName=1.2.18 +app.versionCode=29 diff --git a/assets/skins/default_img1.png b/assets/skins/default_img1.png index 9271f8beb8f9532818341ceb75d8cbb2ed9aa481..9fbc83c323e3a49a3da50981511477ba446b1520 100644 Binary files a/assets/skins/default_img1.png and b/assets/skins/default_img1.png differ diff --git a/assets/skins/default_img2.png b/assets/skins/default_img2.png index 82cb8dcb2701c6bcb473975d5cb1a6dcc0d2aaf7..5fb2a57cc2aaa012fb59247e32e5f63876792e29 100644 Binary files a/assets/skins/default_img2.png and b/assets/skins/default_img2.png differ diff --git a/assets/skins/default_img3.png b/assets/skins/default_img3.png index 9aabea90a3e180829f609ce0da4dfb40b4762896..3589514213eca1216e29a3697c84d04e7ebf68f1 100644 Binary files a/assets/skins/default_img3.png and b/assets/skins/default_img3.png differ diff --git a/assets/skins/default_img4.png b/assets/skins/default_img4.png index 5de0b9da5b21f9ba50097b865a4b051431d56c67..7efdefa6493aabb3c6b51171687ad7184802e2ad 100644 Binary files a/assets/skins/default_img4.png and b/assets/skins/default_img4.png differ diff --git a/assets/skins/default_img5.png b/assets/skins/default_img5.png index 9aa5c5cefe1d560ed2991dc14d92985c86c4b14d..05807d1b1bdb61de234a343e827397645cce1bd3 100644 Binary files a/assets/skins/default_img5.png and b/assets/skins/default_img5.png differ diff --git a/assets/skins/default_img6.png b/assets/skins/default_img6.png index 39ba063999584c5cbeb3b42dc4afc3fbccb84256..a9eb240fec8019cf828e4e5f7f9dfdf7c66e9be8 100644 Binary files a/assets/skins/default_img6.png and b/assets/skins/default_img6.png differ diff --git a/assets/skins/default_img7.png b/assets/skins/default_img7.png index 3cfef2247142d6683dc2512c6fedc7e3d57dd4d0..14e83c700a031df212a39f29508186f7aff4290c 100644 Binary files a/assets/skins/default_img7.png and b/assets/skins/default_img7.png differ diff --git a/assets/skins/default_img8.png b/assets/skins/default_img8.png index de0079db4875944a56288f5b0d631389a0116afe..cd42c9a8136451646327a160549064b6e0688177 100644 Binary files a/assets/skins/default_img8.png and b/assets/skins/default_img8.png differ diff --git a/assets/skins/default_img9.png b/assets/skins/default_img9.png index c96a2f9afef971f07dde3b403edc6a3d6e09185f..4f319b818c0ccde293bf9ced22376beaabfd9d92 100644 Binary files a/assets/skins/default_img9.png and b/assets/skins/default_img9.png differ diff --git a/assets/ui/button_back.png b/assets/ui/button_back.png index cc48ffb1dbb653d9a996f139dfbe02969724bfa5..51d7a01d171f7d7f047ecf9dee2d7ceee23b310d 100644 Binary files a/assets/ui/button_back.png and b/assets/ui/button_back.png differ diff --git a/assets/ui/button_delete_saved_game.png b/assets/ui/button_delete_saved_game.png index 5e4f217689b11e444b7163557d7e5d68f3bbfe7d..4ca5b749c208c4b7eac2a4b141a1bd918d7cb98f 100644 Binary files a/assets/ui/button_delete_saved_game.png and b/assets/ui/button_delete_saved_game.png differ diff --git a/assets/ui/button_resume_game.png b/assets/ui/button_resume_game.png index b2ea0a02d05e42377eb551a4b51428b511a32f5d..2fe433b7d18a39880a14e3f0af18cb75c4ccbaed 100644 Binary files a/assets/ui/button_resume_game.png and b/assets/ui/button_resume_game.png differ diff --git a/assets/ui/button_start.png b/assets/ui/button_start.png index 6845e2f5c21598ab61f1684d2075aeec0334bf23..23c7a4f670de19ffac455d6c510c3c53653a048b 100644 Binary files a/assets/ui/button_start.png and b/assets/ui/button_start.png differ diff --git a/lib/config/default_game_settings.dart b/lib/config/default_game_settings.dart index f1f3a0c50240191264148f9ecf212227b1e99caf..64897e33d43c702893dd30aaa32b23b21820a994 100644 --- a/lib/config/default_game_settings.dart +++ b/lib/config/default_game_settings.dart @@ -41,9 +41,4 @@ class DefaultGameSettings { printlog('Did not find any available value for game parameter "$parameterCode".'); return []; } - - // parameters displayed with assets (instead of painter) - static List<String> displayedWithAssets = [ - // - ]; } diff --git a/lib/config/default_global_settings.dart b/lib/config/default_global_settings.dart index 678b88053acaf959db2266ce3fee9c026ef8d898..0c9062fb9bfe986f977d5591ba4bd5061fcaa977 100644 --- a/lib/config/default_global_settings.dart +++ b/lib/config/default_global_settings.dart @@ -25,9 +25,4 @@ class DefaultGlobalSettings { printlog('Did not find any available value for global parameter "$parameterCode".'); return []; } - - // parameters displayed with assets (instead of painter) - static List<String> displayedWithAssets = [ - // - ]; } diff --git a/lib/ui/helpers/styled_button.dart b/lib/ui/helpers/styled_button.dart new file mode 100644 index 0000000000000000000000000000000000000000..72e5621ce80f9f619d1713234c5976e9c5e22c86 --- /dev/null +++ b/lib/ui/helpers/styled_button.dart @@ -0,0 +1,210 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/material.dart'; + +import 'package:hangman/utils/color_extensions.dart'; + +class StyledButton extends StatelessWidget { + const StyledButton({ + super.key, + required this.color, + required this.onPressed, + this.onLongPress, + required this.child, + }); + + final Color color; + final VoidCallback? onPressed; + final VoidCallback? onLongPress; + final Widget child; + + factory StyledButton.text({ + Key? key, + required VoidCallback? onPressed, + VoidCallback? onLongPress, + required String caption, + required Color color, + }) { + final Widget captionWidget = AutoSizeText( + caption, + maxLines: 1, + style: TextStyle( + inherit: true, + fontWeight: FontWeight.w900, + color: color.darken(60), + shadows: [ + Shadow( + blurRadius: 5.0, + color: color.lighten(60), + offset: const Offset(2, 2), + ), + Shadow( + blurRadius: 5.0, + color: color.lighten(60), + offset: const Offset(2, -2), + ), + Shadow( + blurRadius: 5.0, + color: color.lighten(60), + offset: const Offset(-2, 2), + ), + Shadow( + blurRadius: 5.0, + color: color.lighten(60), + offset: const Offset(-2, -2), + ), + ], + ), + ); + + return StyledButton( + color: color, + onPressed: onPressed, + onLongPress: onLongPress, + child: captionWidget, + ); + } + + factory StyledButton.icon({ + Key? key, + required VoidCallback? onPressed, + VoidCallback? onLongPress, + required Icon icon, + required Color color, + required double iconSize, + }) { + return StyledButton( + color: color, + onPressed: onPressed, + onLongPress: onLongPress, + child: Icon( + icon.icon, + color: icon.color ?? color.darken(60), + size: iconSize, + shadows: [ + Shadow( + blurRadius: 5.0, + color: color.lighten(60), + offset: const Offset(2, 2), + ), + Shadow( + blurRadius: 5.0, + color: color.lighten(60), + offset: const Offset(2, -2), + ), + Shadow( + blurRadius: 5.0, + color: color.lighten(60), + offset: const Offset(-2, 2), + ), + Shadow( + blurRadius: 5.0, + color: color.lighten(60), + offset: const Offset(-2, -2), + ), + ], + ), + ); + } + + @override + Widget build(BuildContext context) { + const double borderWidth = 4; + final Color borderColor = color.darken(40); + const double borderRadius = 10; + + return Container( + margin: const EdgeInsets.all(2), + padding: const EdgeInsets.all(2), + decoration: BoxDecoration( + color: color, + border: Border.all( + color: borderColor, + width: borderWidth, + ), + borderRadius: BorderRadius.circular(borderRadius), + ), + child: CustomPaint( + painter: StyledButtonPainter( + baseColor: color, + ), + child: MaterialButton( + onPressed: onPressed, + onLongPress: onLongPress, + padding: const EdgeInsets.all(8), + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, + minWidth: 40, + child: child, + ), + ), + ); + } +} + +class StyledButtonPainter extends CustomPainter { + StyledButtonPainter({ + required this.baseColor, + }); + + final Color baseColor; + + @override + void paint(Canvas canvas, Size size) { + final Color lightColor = baseColor.lighten(20); + final Color darkColor = baseColor.darken(20); + + final Paint paint = Paint()..style = PaintingStyle.fill; + + const double cornerRadius = 6; + + Path topPath = Path() + ..moveTo(cornerRadius, 0) + ..lineTo(size.width - cornerRadius, 0) + ..arcToPoint( + Offset(size.width, cornerRadius), + radius: const Radius.circular(cornerRadius), + ) + ..lineTo(size.width, size.height * .35) + ..quadraticBezierTo( + size.width * .4, + size.height * .1, + 0, + size.height * .3, + ) + ..lineTo(0, cornerRadius) + ..arcToPoint( + const Offset(cornerRadius, 0), + radius: const Radius.circular(cornerRadius), + ); + + Path bottomPath = Path() + ..moveTo(cornerRadius, size.height) + ..lineTo(size.width - cornerRadius, size.height) + ..arcToPoint( + Offset(size.width, size.height - cornerRadius), + radius: const Radius.circular(cornerRadius), + clockwise: false, + ) + ..lineTo(size.width, size.height * .7) + ..quadraticBezierTo( + size.width * .6, + size.height * .9, + 0, + size.height * .7, + ) + ..lineTo(0, size.height - cornerRadius) + ..arcToPoint( + Offset(cornerRadius, size.height), + radius: const Radius.circular(cornerRadius), + clockwise: false, + ); + + paint.color = lightColor; + canvas.drawPath(topPath, paint); + + paint.color = darkColor; + canvas.drawPath(bottomPath, paint); + } + + @override + bool shouldRepaint(CustomPainter oldDelegate) => false; +} diff --git a/lib/ui/layouts/parameters_layout.dart b/lib/ui/layouts/parameters_layout.dart index 7022e8339ac09d105ce5dc546e0de0a423fef15c..4c52362f878d27bc1d809233c5ce35b048f108f2 100644 --- a/lib/ui/layouts/parameters_layout.dart +++ b/lib/ui/layouts/parameters_layout.dart @@ -5,11 +5,10 @@ import 'package:hangman/config/default_game_settings.dart'; import 'package:hangman/config/default_global_settings.dart'; import 'package:hangman/cubit/settings_game_cubit.dart'; import 'package:hangman/cubit/settings_global_cubit.dart'; -import 'package:hangman/ui/parameters/parameter_painter.dart'; +import 'package:hangman/ui/parameters/parameter_widget.dart'; import 'package:hangman/ui/widgets/actions/button_delete_saved_game.dart'; import 'package:hangman/ui/widgets/actions/button_game_start_new.dart'; import 'package:hangman/ui/widgets/actions/button_resume_saved_game.dart'; -import 'package:hangman/ui/parameters/parameter_image.dart'; class ParametersLayout extends StatelessWidget { const ParametersLayout({super.key, required this.canResume}); @@ -35,21 +34,27 @@ class ParametersLayout extends StatelessWidget { lines.add(SizedBox(height: separatorHeight)); } - lines.add(SizedBox(height: separatorHeight)); + lines.add(Expanded( + child: SizedBox(height: separatorHeight), + )); if (canResume == false) { // Start new game - lines.add(const Expanded( - child: StartNewGameButton(), - )); + lines.add( + const AspectRatio( + aspectRatio: 3, + child: StartNewGameButton(), + ), + ); } else { // Resume game - lines.add(const Expanded( + lines.add(const AspectRatio( + aspectRatio: 3, child: ResumeSavedGameButton(), )); // Delete saved game lines.add(SizedBox.square( - dimension: MediaQuery.of(context).size.width / 4, + dimension: MediaQuery.of(context).size.width / 5, child: const DeleteSavedGameButton(), )); } @@ -102,44 +107,26 @@ class ParametersLayout extends StatelessWidget { ? globalSettingsCubit.getParameterValue(code) : gameSettingsCubit.getParameterValue(code); - final bool isActive = (value == currentValue); + final bool isSelected = (value == currentValue); final double displayWidth = MediaQuery.of(context).size.width; - final double itemWidth = displayWidth / availableValues.length - 26; - - final bool displayedWithAssets = - DefaultGlobalSettings.displayedWithAssets.contains(code) || - DefaultGameSettings.displayedWithAssets.contains(code); - - return TextButton( - child: Container( - child: displayedWithAssets - ? SizedBox.square( - dimension: itemWidth, - child: ParameterImage( - code: code, - value: value, - isSelected: isActive, - ), - ) - : CustomPaint( - size: Size(itemWidth, itemWidth), - willChange: false, - painter: ParameterPainter( - code: code, - value: value, - isSelected: isActive, - gameSettings: gameSettingsState.settings, - globalSettings: globalSettingsState.settings, - ), - isComplex: true, - ), + final double itemWidth = displayWidth / availableValues.length - 4; + + return SizedBox.square( + dimension: itemWidth, + child: ParameterWidget( + code: code, + value: value, + isSelected: isSelected, + size: itemWidth, + gameSettings: gameSettingsState.settings, + globalSettings: globalSettingsState.settings, + onPressed: () { + isGlobal + ? globalSettingsCubit.setParameterValue(code, value) + : gameSettingsCubit.setParameterValue(code, value); + }, ), - onPressed: () { - isGlobal - ? globalSettingsCubit.setParameterValue(code, value) - : gameSettingsCubit.setParameterValue(code, value); - }, ); }, ); diff --git a/lib/ui/parameters/parameter_image.dart b/lib/ui/parameters/parameter_image.dart deleted file mode 100644 index fc4b576f85b01158b74548400d11a4d027c57fbe..0000000000000000000000000000000000000000 --- a/lib/ui/parameters/parameter_image.dart +++ /dev/null @@ -1,38 +0,0 @@ -import 'package:flutter/material.dart'; - -class ParameterImage extends StatelessWidget { - const ParameterImage({ - super.key, - required this.code, - required this.value, - required this.isSelected, - }); - - final String code; - final String value; - final bool isSelected; - - static const Color buttonBackgroundColor = Colors.white; - static const Color buttonBorderColorActive = Colors.blue; - static const Color buttonBorderColorInactive = Colors.white; - static const double buttonBorderWidth = 8.0; - static const double buttonBorderRadius = 8.0; - - @override - Widget build(BuildContext context) { - return Container( - decoration: BoxDecoration( - color: buttonBackgroundColor, - borderRadius: BorderRadius.circular(buttonBorderRadius), - border: Border.all( - color: isSelected ? buttonBorderColorActive : buttonBorderColorInactive, - width: buttonBorderWidth, - ), - ), - child: Image( - image: AssetImage('assets/ui/${code}_$value.png'), - fit: BoxFit.fill, - ), - ); - } -} diff --git a/lib/ui/parameters/parameter_painter.dart b/lib/ui/parameters/parameter_painter.dart index 995ac7a3f1fd63bcd42b034803a9f555f5958bed..96a7a233f328f66f25ed26bd18197e5307748466 100644 --- a/lib/ui/parameters/parameter_painter.dart +++ b/lib/ui/parameters/parameter_painter.dart @@ -11,14 +11,12 @@ class ParameterPainter extends CustomPainter { const ParameterPainter({ required this.code, required this.value, - required this.isSelected, required this.gameSettings, required this.globalSettings, }); final String code; final String value; - final bool isSelected; final GameSettings gameSettings; final GlobalSettings globalSettings; @@ -27,29 +25,17 @@ class ParameterPainter extends CustomPainter { // force square final double canvasSize = min(size.width, size.height); - const Color borderColorEnabled = Colors.blue; - const Color borderColorDisabled = Colors.white; - - // "enabled/disabled" border - final paint = Paint(); - paint.style = PaintingStyle.stroke; - paint.color = isSelected ? borderColorEnabled : borderColorDisabled; - paint.strokeJoin = StrokeJoin.round; - paint.strokeWidth = 10; - canvas.drawRect( - Rect.fromPoints(const Offset(0, 0), Offset(canvasSize, canvasSize)), paint); - // content switch (code) { case DefaultGameSettings.parameterCodeGameMode: - paintGameModeParameterItem(value, canvas, canvasSize); + paintGameModeParameterItem(canvas, canvasSize); break; case DefaultGameSettings.parameterCodeGameLevel: - paintGameLevelParameterItem(value, canvas, canvasSize); + paintGameLevelParameterItem(canvas, canvasSize); break; default: printlog('Unknown parameter: $code/$value'); - paintUnknownParameterItem(value, canvas, canvasSize); + paintUnknownParameterItem(canvas, canvasSize); } } @@ -60,7 +46,6 @@ class ParameterPainter extends CustomPainter { // "unknown" parameter -> simple block with text void paintUnknownParameterItem( - final String value, final Canvas canvas, final double size, ) { @@ -68,12 +53,8 @@ class ParameterPainter extends CustomPainter { paint.strokeJoin = StrokeJoin.round; paint.strokeWidth = 3; - paint.color = Colors.grey; - paint.style = PaintingStyle.fill; - canvas.drawRect(Rect.fromPoints(const Offset(0, 0), Offset(size, size)), paint); - final textSpan = TextSpan( - text: '?\n$value', + text: '$code\n$value', style: const TextStyle( color: Colors.black, fontSize: 18, @@ -96,11 +77,9 @@ class ParameterPainter extends CustomPainter { } void paintGameModeParameterItem( - final String value, final Canvas canvas, final double size, ) { - const Color backgroundColor = Colors.grey; String text = ''; switch (value) { @@ -118,11 +97,6 @@ class ParameterPainter extends CustomPainter { paint.strokeJoin = StrokeJoin.round; paint.strokeWidth = 3 / 100 * size; - // Colored background - paint.color = backgroundColor; - paint.style = PaintingStyle.fill; - canvas.drawRect(Rect.fromPoints(const Offset(0, 0), Offset(size, size)), paint); - // centered text value final textSpan = TextSpan( text: text, @@ -148,20 +122,16 @@ class ParameterPainter extends CustomPainter { } void paintGameLevelParameterItem( - final String value, final Canvas canvas, final double size, ) { - Color backgroundColor = Colors.grey; String text = ''; switch (value) { case DefaultGameSettings.gameLevelValueEasy: - backgroundColor = Colors.green; text = '🧒'; break; case DefaultGameSettings.gameLevelValueHard: - backgroundColor = Colors.orange; text = '🧑🎓'; break; default: @@ -172,11 +142,6 @@ class ParameterPainter extends CustomPainter { paint.strokeJoin = StrokeJoin.round; paint.strokeWidth = 3 / 100 * size; - // Colored background - paint.color = backgroundColor; - paint.style = PaintingStyle.fill; - canvas.drawRect(Rect.fromPoints(const Offset(0, 0), Offset(size, size)), paint); - // centered text value final textSpan = TextSpan( text: text, diff --git a/lib/ui/parameters/parameter_widget.dart b/lib/ui/parameters/parameter_widget.dart new file mode 100644 index 0000000000000000000000000000000000000000..0e805a82e8b6fd16bed6d5da2a6354378772ec2e --- /dev/null +++ b/lib/ui/parameters/parameter_widget.dart @@ -0,0 +1,137 @@ +import 'package:flutter/material.dart'; + +import 'package:hangman/config/default_game_settings.dart'; +import 'package:hangman/config/default_global_settings.dart'; +import 'package:hangman/models/settings/settings_game.dart'; +import 'package:hangman/models/settings/settings_global.dart'; +import 'package:hangman/ui/helpers/styled_button.dart'; +import 'package:hangman/ui/parameters/parameter_painter.dart'; +import 'package:hangman/utils/tools.dart'; + +class ParameterWidget extends StatelessWidget { + const ParameterWidget({ + super.key, + required this.code, + required this.value, + required this.isSelected, + required this.size, + required this.gameSettings, + required this.globalSettings, + required this.onPressed, + }); + + final String code; + final String value; + final bool isSelected; + final double size; + final GameSettings gameSettings; + final GlobalSettings globalSettings; + final VoidCallback onPressed; + + static const Color buttonColorActive = Colors.blue; + static const Color buttonColorInactive = Colors.white; + static const double buttonBorderWidth = 4.0; + static const double buttonBorderRadius = 12.0; + + @override + Widget build(BuildContext context) { + Widget content = const SizedBox.shrink(); + + switch (code) { + case DefaultGameSettings.parameterCodeGameMode: + content = getGameModeParameterItem(); + break; + case DefaultGameSettings.parameterCodeGameLevel: + content = getGameLevelParameterItem(); + break; + case DefaultGlobalSettings.parameterCodeSkin: + content = getSkinParameterItem(); + break; + default: + printlog('Unknown parameter: $code/$value'); + content = getUnknownParameterItem(); + } + + final Color buttonColor = isSelected ? buttonColorActive : buttonColorInactive; + + return Container( + decoration: BoxDecoration( + color: buttonColor, + borderRadius: BorderRadius.circular(buttonBorderRadius), + border: Border.all( + color: buttonColor, + width: buttonBorderWidth, + ), + ), + child: content, + ); + } + + // "unknown" parameter -> simple block with text + Widget getUnknownParameterItem() { + return StyledButton.text( + caption: '$code / $value', + color: Colors.grey, + onPressed: null, + ); + } + + Widget getGameModeParameterItem() { + const Color backgroundColor = Colors.grey; + + return StyledButton( + color: backgroundColor, + onPressed: onPressed, + child: CustomPaint( + size: Size(size, size), + willChange: false, + painter: ParameterPainter( + code: code, + value: value, + gameSettings: gameSettings, + globalSettings: globalSettings, + ), + isComplex: true, + ), + ); + } + + Widget getGameLevelParameterItem() { + Color backgroundColor = Colors.grey; + + switch (value) { + case DefaultGameSettings.gameLevelValueEasy: + backgroundColor = Colors.green; + break; + case DefaultGameSettings.gameLevelValueHard: + backgroundColor = Colors.orange; + break; + default: + printlog('Wrong value for size parameter value: $value'); + } + + return StyledButton( + color: backgroundColor, + onPressed: onPressed, + child: CustomPaint( + size: Size(size, size), + willChange: false, + painter: ParameterPainter( + code: code, + value: value, + gameSettings: gameSettings, + globalSettings: globalSettings, + ), + isComplex: true, + ), + ); + } + + Widget getSkinParameterItem() { + return StyledButton.text( + color: Colors.green.shade800, + onPressed: onPressed, + caption: value, + ); + } +} diff --git a/lib/ui/widgets/actions/button_delete_saved_game.dart b/lib/ui/widgets/actions/button_delete_saved_game.dart index 9ea5a65b330bf4ac1b51e63f126ea6464dadc364..27bea6e9e5e01d6d1078b5ac15026b558b5eacba 100644 --- a/lib/ui/widgets/actions/button_delete_saved_game.dart +++ b/lib/ui/widgets/actions/button_delete_saved_game.dart @@ -2,20 +2,22 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:hangman/cubit/game_cubit.dart'; +import 'package:hangman/ui/helpers/styled_button.dart'; class DeleteSavedGameButton extends StatelessWidget { const DeleteSavedGameButton({super.key}); @override Widget build(BuildContext context) { - return TextButton( + return StyledButton( + color: Colors.grey, + onPressed: () { + BlocProvider.of<GameCubit>(context).deleteSavedGame(); + }, child: const Image( image: AssetImage('assets/ui/button_delete_saved_game.png'), fit: BoxFit.fill, ), - onPressed: () { - BlocProvider.of<GameCubit>(context).deleteSavedGame(); - }, ); } } diff --git a/lib/ui/widgets/actions/button_game_quit.dart b/lib/ui/widgets/actions/button_game_quit.dart index 6b2978245dbaa01be2b74e47b876683dbf445ca5..77675a3b86c5fab898620983af39f61655842d7a 100644 --- a/lib/ui/widgets/actions/button_game_quit.dart +++ b/lib/ui/widgets/actions/button_game_quit.dart @@ -2,20 +2,22 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:hangman/cubit/game_cubit.dart'; +import 'package:hangman/ui/helpers/styled_button.dart'; class QuitGameButton extends StatelessWidget { const QuitGameButton({super.key}); @override Widget build(BuildContext context) { - return ElevatedButton( + return StyledButton( + color: Colors.red, + onPressed: () { + BlocProvider.of<GameCubit>(context).quitGame(); + }, child: const Image( image: AssetImage('assets/ui/button_back.png'), fit: BoxFit.fill, ), - onPressed: () { - BlocProvider.of<GameCubit>(context).quitGame(); - }, ); } } diff --git a/lib/ui/widgets/actions/button_game_start_new.dart b/lib/ui/widgets/actions/button_game_start_new.dart index 1c8af9a5ab3dcbcc29b0fa392f33d57191ace346..0e59b84bc4753027b5ece12f62db56146fddc2f6 100644 --- a/lib/ui/widgets/actions/button_game_start_new.dart +++ b/lib/ui/widgets/actions/button_game_start_new.dart @@ -4,6 +4,7 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:hangman/cubit/game_cubit.dart'; import 'package:hangman/cubit/settings_game_cubit.dart'; import 'package:hangman/cubit/settings_global_cubit.dart'; +import 'package:hangman/ui/helpers/styled_button.dart'; class StartNewGameButton extends StatelessWidget { const StartNewGameButton({super.key}); @@ -14,17 +15,18 @@ class StartNewGameButton extends StatelessWidget { builder: (BuildContext context, GameSettingsState gameSettingsState) { return BlocBuilder<GlobalSettingsCubit, GlobalSettingsState>( builder: (BuildContext context, GlobalSettingsState globalSettingsState) { - return TextButton( - child: const Image( - image: AssetImage('assets/ui/button_start.png'), - fit: BoxFit.fill, - ), + return StyledButton( + color: Colors.blue, onPressed: () { BlocProvider.of<GameCubit>(context).startNewGame( gameSettings: gameSettingsState.settings, globalSettings: globalSettingsState.settings, ); }, + child: const Image( + image: AssetImage('assets/ui/button_start.png'), + fit: BoxFit.fill, + ), ); }, ); diff --git a/lib/ui/widgets/actions/button_resume_saved_game.dart b/lib/ui/widgets/actions/button_resume_saved_game.dart index 2660baa90f8b3777564c116b768cf4eccee10ef8..356305fe57621cd315136a4b36dada1b8fad5009 100644 --- a/lib/ui/widgets/actions/button_resume_saved_game.dart +++ b/lib/ui/widgets/actions/button_resume_saved_game.dart @@ -2,20 +2,22 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:hangman/cubit/game_cubit.dart'; +import 'package:hangman/ui/helpers/styled_button.dart'; class ResumeSavedGameButton extends StatelessWidget { const ResumeSavedGameButton({super.key}); @override Widget build(BuildContext context) { - return TextButton( + return StyledButton( + color: Colors.blue, + onPressed: () { + BlocProvider.of<GameCubit>(context).resumeSavedGame(); + }, child: const Image( image: AssetImage('assets/ui/button_resume_game.png'), fit: BoxFit.fill, ), - onPressed: () { - BlocProvider.of<GameCubit>(context).resumeSavedGame(); - }, ); } } diff --git a/lib/ui/widgets/game/game_end.dart b/lib/ui/widgets/game/game_end.dart index acf9c8209447473a381152921cafd55f32630107..08e0dcc5c923fa95ccad0e56c676eef765c5bfe2 100644 --- a/lib/ui/widgets/game/game_end.dart +++ b/lib/ui/widgets/game/game_end.dart @@ -25,6 +25,7 @@ class GameEndWidget extends StatelessWidget { padding: const EdgeInsets.all(2), child: Table( defaultColumnWidth: const IntrinsicColumnWidth(), + defaultVerticalAlignment: TableCellVerticalAlignment.bottom, children: [ TableRow( children: [ diff --git a/lib/ui/widgets/global_app_bar.dart b/lib/ui/widgets/global_app_bar.dart index 8e56835db33475c88241a4711556b9a51c3145c3..f93b4f0c0ffa9838731e19987370050564026b33 100644 --- a/lib/ui/widgets/global_app_bar.dart +++ b/lib/ui/widgets/global_app_bar.dart @@ -6,6 +6,7 @@ import 'package:hangman/cubit/game_cubit.dart'; import 'package:hangman/cubit/nav_cubit.dart'; import 'package:hangman/models/game/game.dart'; import 'package:hangman/ui/helpers/app_titles.dart'; +import 'package:hangman/ui/helpers/styled_button.dart'; class GlobalAppBar extends StatelessWidget implements PreferredSizeWidget { const GlobalAppBar({super.key}); @@ -21,16 +22,16 @@ class GlobalAppBar extends StatelessWidget implements PreferredSizeWidget { final List<Widget> menuActions = []; if (currentGame.isRunning && !currentGame.isFinished) { - menuActions.add(TextButton( + menuActions.add(StyledButton( + color: Colors.red, + onPressed: () {}, + onLongPress: () { + BlocProvider.of<GameCubit>(context).quitGame(); + }, child: const Image( image: AssetImage('assets/ui/button_back.png'), fit: BoxFit.fill, ), - onPressed: () {}, - onLongPress: () { - final GameCubit gameCubit = BlocProvider.of<GameCubit>(context); - gameCubit.quitGame(); - }, )); } else { if (pageIndex == Menu.indexGame) { diff --git a/pubspec.lock b/pubspec.lock index bbf060c1d2f00d1a8f8bdb1b07ec681da40180ec..36a345c00a0e8bd3912bbbd06fc5514b8fea0142 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -17,6 +17,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.11.0" + auto_size_text: + dependency: "direct main" + description: + name: auto_size_text + sha256: "3f5261cd3fb5f2a9ab4e2fc3fba84fd9fcaac8821f20a1d4e71f557521b22599" + url: "https://pub.dev" + source: hosted + version: "3.0.0" bloc: dependency: transitive description: @@ -69,10 +77,10 @@ packages: dependency: "direct main" description: name: diacritic - sha256: "96db5db6149cbe4aa3cfcbfd170aca9b7648639be7e48025f9d458517f807fe4" + sha256: "12981945ec38931748836cd76f2b38773118d0baef3c68404bdfde9566147876" url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.1.6" easy_localization: dependency: "direct main" description: @@ -109,10 +117,10 @@ packages: dependency: transitive description: name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 url: "https://pub.dev" source: hosted - version: "7.0.0" + version: "7.0.1" flutter: dependency: "direct main" description: flutter @@ -130,10 +138,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "5.0.0" flutter_localizations: dependency: transitive description: flutter @@ -196,10 +204,10 @@ packages: dependency: transitive description: name: lints - sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" + sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "5.0.0" material_color_utilities: dependency: transitive description: @@ -228,10 +236,10 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 + sha256: "894f37107424311bdae3e476552229476777b8752c5a2a2369c0cb9a2d5442ef" url: "https://pub.dev" source: hosted - version: "8.0.2" + version: "8.0.3" package_info_plus_platform_interface: dependency: transitive description: @@ -260,10 +268,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" + sha256: c464428172cb986b758c6d1724c603097febb8fb855aa265aeecc9280c294d4a url: "https://pub.dev" source: hosted - version: "2.2.10" + version: "2.2.12" path_provider_foundation: dependency: transitive description: @@ -332,18 +340,18 @@ packages: dependency: transitive description: name: shared_preferences_android - sha256: a7e8467e9181cef109f601e3f65765685786c1a738a83d7fbbde377589c0d974 + sha256: "3b9febd815c9ca29c9e3520d50ec32f49157711e143b7a4ca039eb87e8ade5ab" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.3" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - sha256: c4b35f6cb8f63c147312c054ce7c2254c8066745125264f0c88739c417fc9d9f + sha256: "07e050c7cd39bad516f8d64c455f04508d09df104be326d8c02551590a0d513d" url: "https://pub.dev" source: hosted - version: "2.5.2" + version: "2.5.3" shared_preferences_linux: dependency: transitive description: @@ -401,10 +409,10 @@ packages: dependency: transitive description: name: synchronized - sha256: a824e842b8a054f91a728b783c177c1e4731f6b124f9192468457a8913371255 + sha256: "69fe30f3a8b04a0be0c15ae6490fc859a78ef4c43ae2dd5e8a623d45bfcf9225" url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "3.3.0+3" term_glyph: dependency: transitive description: @@ -425,10 +433,10 @@ packages: dependency: "direct main" description: name: unicons - sha256: "1cca7462df18ff191b7e41b52f747d08854916531d1d7ab7cec0552095995206" + sha256: f3eab9d87c226415ef857cfd2167e1d12ad81ea1f5783b46cf644224fea4eab7 url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "3.0.0" vector_math: dependency: transitive description: @@ -441,26 +449,26 @@ packages: dependency: transitive description: name: web - sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.1.0" win32: dependency: transitive description: name: win32 - sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" + sha256: "4d45dc9069dba4619dc0ebd93c7cec5e66d8482cb625a370ac806dcc8165f2ec" url: "https://pub.dev" source: hosted - version: "5.5.4" + version: "5.5.5" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.1.0" sdks: dart: ">=3.5.0 <4.0.0" - flutter: ">=3.22.0" + flutter: ">=3.24.0" diff --git a/pubspec.yaml b/pubspec.yaml index 344a91808baf139742e0939f363f0a02e9b52a28..17487c673d053afd14f0789b279fcf8c75d6031f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: Hangman game, have fun with words and letters! publish_to: "none" -version: 1.2.17+28 +version: 1.2.18+29 environment: sdk: "^3.0.0" @@ -13,6 +13,7 @@ dependencies: sdk: flutter # base + auto_size_text: ^3.0.0 easy_localization: ^3.0.1 equatable: ^2.0.5 flutter_bloc: ^8.1.1 @@ -20,7 +21,7 @@ dependencies: hydrated_bloc: ^9.0.0 package_info_plus: ^8.0.0 path_provider: ^2.0.11 - unicons: ^2.1.1 + unicons: ^3.0.0 # specific diacritic: ^0.1.4 @@ -28,7 +29,7 @@ dependencies: http: ^1.1.0 dev_dependencies: - flutter_lints: ^4.0.0 + flutter_lints: ^5.0.0 flutter: uses-material-design: true @@ -51,4 +52,3 @@ flutter: weight: 400 - asset: assets/fonts/Nunito-Light.ttf weight: 300 - diff --git a/resources/app/build_application_resources.sh b/resources/app/build_application_resources.sh index 6d67b8f4f9eca701d1aed7331ef41dfb0bd44f20..1ace90d0e0029bf1704122d2b60bced59d5ed348 100755 --- a/resources/app/build_application_resources.sh +++ b/resources/app/build_application_resources.sh @@ -1,9 +1,18 @@ #! /bin/bash # Check dependencies -command -v inkscape >/dev/null 2>&1 || { echo >&2 "I require inkscape but it's not installed. Aborting."; exit 1; } -command -v scour >/dev/null 2>&1 || { echo >&2 "I require scour but it's not installed. Aborting."; exit 1; } -command -v optipng >/dev/null 2>&1 || { echo >&2 "I require optipng but it's not installed. Aborting."; exit 1; } +command -v inkscape >/dev/null 2>&1 || { + echo >&2 "I require inkscape but it's not installed. Aborting." + exit 1 +} +command -v scour >/dev/null 2>&1 || { + echo >&2 "I require scour but it's not installed. Aborting." + exit 1 +} +command -v optipng >/dev/null 2>&1 || { + echo >&2 "I require optipng but it's not installed. Aborting." + exit 1 +} CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" BASE_DIR="$(dirname "$(dirname "${CURRENT_DIR}")")" @@ -31,14 +40,14 @@ function optimize_svg() { cp ${SVG} ${SVG}.tmp scour \ - --remove-descriptive-elements \ - --enable-id-stripping \ - --enable-viewboxing \ - --enable-comment-stripping \ - --nindent=4 \ - --quiet \ - -i ${SVG}.tmp \ - -o ${SVG} + --remove-descriptive-elements \ + --enable-id-stripping \ + --enable-viewboxing \ + --enable-comment-stripping \ + --nindent=4 \ + --quiet \ + -i ${SVG}.tmp \ + -o ${SVG} rm ${SVG}.tmp } @@ -57,10 +66,10 @@ function build_application_icon() { TARGET_PNG="${TARGET}.png" inkscape \ - --export-width=${ICON_SIZE} \ - --export-height=${ICON_SIZE} \ - --export-filename=${TARGET_PNG} \ - ${SOURCE_ICON} + --export-width=${ICON_SIZE} \ + --export-height=${ICON_SIZE} \ + --export-filename=${TARGET_PNG} \ + ${SOURCE_ICON} optipng ${OPTIPNG_OPTIONS} ${TARGET_PNG} } @@ -76,10 +85,10 @@ function build_fastlane_image() { TARGET_PNG="${TARGET}.png" inkscape \ - --export-width=${WIDTH} \ - --export-height=${HEIGHT} \ - --export-filename=${TARGET_PNG} \ - ${SOURCE_FASTLANE} + --export-width=${WIDTH} \ + --export-height=${HEIGHT} \ + --export-filename=${TARGET_PNG} \ + ${SOURCE_FASTLANE} optipng ${OPTIPNG_OPTIONS} ${TARGET_PNG} } @@ -94,24 +103,24 @@ function build_launch_image() { TARGET_PNG="${TARGET}.png" inkscape \ - --export-width=${ICON_SIZE} \ - --export-height=${ICON_SIZE} \ - --export-filename=${TARGET_PNG} \ - ${SOURCE_LAUNCH_IMAGE} + --export-width=${ICON_SIZE} \ + --export-height=${ICON_SIZE} \ + --export-filename=${TARGET_PNG} \ + ${SOURCE_LAUNCH_IMAGE} optipng ${OPTIPNG_OPTIONS} ${TARGET_PNG} } -build_application_icon 72 ${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/ic_launcher -build_application_icon 48 ${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/ic_launcher -build_application_icon 96 ${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/ic_launcher +build_application_icon 72 ${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/ic_launcher +build_application_icon 48 ${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/ic_launcher +build_application_icon 96 ${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/ic_launcher build_application_icon 144 ${BASE_DIR}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher build_application_icon 192 ${BASE_DIR}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher build_application_icon 512 ${BASE_DIR}/fastlane/metadata/android/en-US/images/icon -build_launch_image 72 ${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/launch_image -build_launch_image 48 ${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/launch_image -build_launch_image 96 ${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/launch_image +build_launch_image 72 ${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/launch_image +build_launch_image 48 ${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/launch_image +build_launch_image 96 ${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/launch_image build_launch_image 144 ${BASE_DIR}/android/app/src/main/res/mipmap-xxhdpi/launch_image build_launch_image 192 ${BASE_DIR}/android/app/src/main/res/mipmap-xxxhdpi/launch_image diff --git a/resources/data/build_words_lists.sh b/resources/data/build_words_lists.sh index 927331a3a23b0918a032f80375e4886b6d0733dd..42895cc13c9391504e44063ee20415df585c8268 100755 --- a/resources/data/build_words_lists.sh +++ b/resources/data/build_words_lists.sh @@ -1,6 +1,9 @@ #!/usr/bin/env bash -command -v jq >/dev/null 2>&1 || { echo >&2 "I require jq (json parser) but it's not installed. Aborting."; exit 1; } +command -v jq >/dev/null 2>&1 || { + echo >&2 "I require jq (json parser) but it's not installed. Aborting." + exit 1 +} CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" BASE_DIR="$(dirname "$(dirname "${CURRENT_DIR}")")" diff --git a/resources/ui/build_ui_resources.sh b/resources/ui/build_ui_resources.sh index 2375593637ee4aa2198bceffffa4ba668358dc05..f6c3f33201ae81b1f43cf677bb76c91e04727f33 100755 --- a/resources/ui/build_ui_resources.sh +++ b/resources/ui/build_ui_resources.sh @@ -1,9 +1,18 @@ #! /bin/bash # Check dependencies -command -v inkscape >/dev/null 2>&1 || { echo >&2 "I require inkscape but it's not installed. Aborting."; exit 1; } -command -v scour >/dev/null 2>&1 || { echo >&2 "I require scour but it's not installed. Aborting."; exit 1; } -command -v optipng >/dev/null 2>&1 || { echo >&2 "I require optipng but it's not installed. Aborting."; exit 1; } +command -v inkscape >/dev/null 2>&1 || { + echo >&2 "I require inkscape but it's not installed. Aborting." + exit 1 +} +command -v scour >/dev/null 2>&1 || { + echo >&2 "I require scour but it's not installed. Aborting." + exit 1 +} +command -v optipng >/dev/null 2>&1 || { + echo >&2 "I require optipng but it's not installed. Aborting." + exit 1 +} CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" BASE_DIR="$(dirname "$(dirname "${CURRENT_DIR}")")" @@ -44,14 +53,14 @@ function optimize_svg() { cp ${SOURCE} ${SOURCE}.tmp scour \ - --remove-descriptive-elements \ - --enable-id-stripping \ - --enable-viewboxing \ - --enable-comment-stripping \ - --nindent=4 \ - --quiet \ - -i ${SOURCE}.tmp \ - -o ${SOURCE} + --remove-descriptive-elements \ + --enable-id-stripping \ + --enable-viewboxing \ + --enable-comment-stripping \ + --nindent=4 \ + --quiet \ + -i ${SOURCE}.tmp \ + -o ${SOURCE} rm ${SOURCE}.tmp } @@ -72,10 +81,10 @@ function build_svg_image() { mkdir -p "$(dirname "${TARGET}")" inkscape \ - --export-width=${IMAGE_SIZE} \ - --export-height=${IMAGE_SIZE} \ - --export-filename=${TARGET} \ - "${SOURCE}" + --export-width=${IMAGE_SIZE} \ + --export-height=${IMAGE_SIZE} \ + --export-filename=${TARGET} \ + "${SOURCE}" optipng ${OPTIPNG_OPTIONS} "${TARGET}" } @@ -103,12 +112,10 @@ function build_images_for_skin() { SKIN_CODE="$1" # skin images - for SKIN_SVG_IMAGE in ${SKIN_SVG_IMAGES} - do + for SKIN_SVG_IMAGE in ${SKIN_SVG_IMAGES}; do build_svg_image ${CURRENT_DIR}/skins/${SKIN_CODE}/${SKIN_SVG_IMAGE}.svg ${ASSETS_DIR}/skins/${SKIN_CODE}_${SKIN_SVG_IMAGE}.png done - for SKIN_PNG_IMAGE in ${SKIN_PNG_IMAGES} - do + for SKIN_PNG_IMAGE in ${SKIN_PNG_IMAGES}; do build_png_image ${CURRENT_DIR}/skins/${SKIN_CODE}/${SKIN_PNG_IMAGE}.png ${ASSETS_DIR}/skins/${SKIN_CODE}_${SKIN_PNG_IMAGE}.png done } @@ -124,18 +131,14 @@ if [ -d "${ASSETS_DIR}/skins" ]; then fi # build game images -for GAME_SVG_IMAGE in ${AVAILABLE_GAME_SVG_IMAGES} -do +for GAME_SVG_IMAGE in ${AVAILABLE_GAME_SVG_IMAGES}; do build_svg_image ${CURRENT_DIR}/images/${GAME_SVG_IMAGE}.svg ${ASSETS_DIR}/ui/${GAME_SVG_IMAGE}.png done -for GAME_PNG_IMAGE in ${AVAILABLE_GAME_PNG_IMAGES} -do +for GAME_PNG_IMAGE in ${AVAILABLE_GAME_PNG_IMAGES}; do build_png_image ${CURRENT_DIR}/images/${GAME_PNG_IMAGE}.png ${ASSETS_DIR}/ui/${GAME_PNG_IMAGE}.png done # build skins images -for SKIN in ${AVAILABLE_SKINS} -do +for SKIN in ${AVAILABLE_SKINS}; do build_images_for_skin "${SKIN}" done - diff --git a/resources/ui/images/button_back.svg b/resources/ui/images/button_back.svg index 2622a578dba53ce582afabfc587c2a85a1fb6eaa..018d8b734d2932028fbfce1643c4e888ff1b45b1 100644 --- a/resources/ui/images/button_back.svg +++ b/resources/ui/images/button_back.svg @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="UTF-8"?> -<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 93.665 93.676" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect x=".44662" y=".89101" width="92.772" height="91.894" ry="11.689" fill="#e41578" stroke="#fff" stroke-width=".238"/><path d="m59.387 71.362c1.1248 1.1302 4.0012 1.1302 4.0012 0v-45.921c0-1.1316-2.8832-1.1316-4.0121 0l-37.693 20.918c-1.1289 1.1248-1.1479 2.9551-0.02171 4.084z" fill="#fefeff" stroke="#930e4e" stroke-linecap="round" stroke-linejoin="round" stroke-width="8.257"/><path d="m57.857 68.048c0.96243 0.96706 3.4236 0.96706 3.4236 0v-39.292c0-0.96825-2.467-0.96825-3.4329 0l-32.252 17.898c-0.96594 0.96243-0.9822 2.5285-0.01858 3.4945z" fill="#fefeff" stroke="#feffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="4.314"/></svg> +<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 93.665 93.676" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path transform="matrix(1.3783 .61747 -.61747 1.3783 45.198 93.762)" d="m11.645-14.603-44.77-4.6003 26.369-36.472z" fill="#fff" stroke="#950e4f" stroke-linecap="round" stroke-linejoin="round" stroke-width="7.2832"/></svg> diff --git a/resources/ui/images/button_delete_saved_game.svg b/resources/ui/images/button_delete_saved_game.svg index ac7eefef476f761903fe781b8c86d0c94323550a..c3f872e434052a6b4e7036b530ced8e6233508e4 100644 --- a/resources/ui/images/button_delete_saved_game.svg +++ b/resources/ui/images/button_delete_saved_game.svg @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="UTF-8"?> -<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 93.665 93.676" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect x=".44662" y=".89101" width="92.772" height="91.894" ry="11.689" fill="#ee7d49" stroke="#fff" stroke-width=".238"/><path d="m61.07 35.601-1.7399 27.837c-0.13442 2.1535-1.9205 3.8312-4.0781 3.8312h-16.84c-2.1576 0-3.9437-1.6777-4.0781-3.8312l-1.7399-27.837h-2.6176c-0.84621 0-1.5323-0.68613-1.5323-1.5323 0-0.84655 0.68613-1.5323 1.5323-1.5323h33.711c0.84621 0 1.5323 0.68578 1.5323 1.5323 0 0.84621-0.68613 1.5323-1.5323 1.5323zm-3.2617 0h-21.953l1.4715 26.674c0.05985 1.0829 0.95531 1.9305 2.0403 1.9305h14.929c1.085 0 1.9804-0.84757 2.0403-1.9305zm-10.977 3.0647c0.78977 0 1.4301 0.6403 1.4301 1.4301v19.614c0 0.78977-0.6403 1.4301-1.4301 1.4301s-1.4301-0.6403-1.4301-1.4301v-19.614c0-0.78977 0.6403-1.4301 1.4301-1.4301zm-6.1293 0c0.80004 0 1.4588 0.62935 1.495 1.4286l0.89647 19.719c0.03182 0.70016-0.50998 1.2933-1.2101 1.3255-0.01915 7.02e-4 -0.03831 1e-3 -0.05781 1e-3 -0.74462 0-1.3596-0.58215-1.4003-1.3261l-1.0757-19.719c-0.0407-0.74701 0.53188-1.3852 1.2786-1.4259 0.02462-0.0014 0.04926-2e-3 0.07388-2e-3zm12.259 0c0.74804 0 1.3541 0.60609 1.3541 1.3541 0 0.02462-3.28e-4 0.04926-0.0017 0.07388l-1.0703 19.618c-0.04379 0.80106-0.70597 1.4281-1.5081 1.4281-0.74804 0-1.3541-0.60609-1.3541-1.3541 0-0.02462 3.49e-4 -0.04925 0.0017-0.07388l1.0703-19.618c0.04379-0.80106 0.70597-1.4281 1.5081-1.4281zm-10.216-12.259h8.1728c2.2567 0 4.086 1.8293 4.086 4.086v2.0433h-16.344v-2.0433c0-2.2567 1.8293-4.086 4.086-4.086zm0.20453 3.0647c-0.67725 0-1.2259 0.54863-1.2259 1.2259v1.8388h10.215v-1.8388c0-0.67725-0.54863-1.2259-1.2259-1.2259z" fill="#fff" fill-rule="evenodd" stroke="#bd4812" stroke-width=".75383"/></svg> +<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 93.665 93.676" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="m76.652 23.303-3.6441 58.302c-0.28153 4.5103-4.0223 8.0241-8.5413 8.0241h-35.27c-4.5189 0-8.2598-3.5138-8.5413-8.0241l-3.6441-58.302h-5.4824c-1.7723 0-3.2093-1.437-3.2093-3.2093 0-1.773 1.437-3.2093 3.2093-3.2093h70.605c1.7723 0 3.2093 1.4363 3.2093 3.2093 0 1.7723-1.437 3.2093-3.2093 3.2093zm-6.8314 0h-45.979l3.0819 55.867c0.12535 2.268 2.0008 4.0433 4.2732 4.0433h31.268c2.2724 0 4.1478-1.7752 4.2732-4.0433zm-22.99 6.4188c1.6541 0 2.9952 1.3411 2.9952 2.9952v41.08c0 1.6541-1.3411 2.9952-2.9952 2.9952-1.6542 0-2.9952-1.3411-2.9952-2.9952v-41.08c0-1.6541 1.3411-2.9952 2.9952-2.9952zm-12.837 0c1.6756 0 3.0553 1.3181 3.1312 2.9921l1.8776 41.3c0.06665 1.4664-1.0681 2.7087-2.5345 2.7762-0.04011 0.0015-0.08024 0.0021-0.12108 0.0021-1.5595 0-2.8476-1.2193-2.9328-2.7774l-2.253-41.3c-0.08524-1.5646 1.114-2.9012 2.6779-2.9864 0.05157-0.0029 0.10317-0.0042 0.15474-0.0042zm25.675 0c1.5667 0 2.8361 1.2694 2.8361 2.8361 0 0.05156-6.87e-4 0.10317-0.0036 0.15474l-2.2416 41.088c-0.09171 1.6778-1.4786 2.991-3.1586 2.991-1.5667 0-2.8361-1.2694-2.8361-2.8361 0-0.05156 7.31e-4 -0.10315 0.0036-0.15474l2.2417-41.088c0.09172-1.6778 1.4786-2.991 3.1586-2.991zm-21.397-25.675h17.117c4.7265 0 8.5578 3.8313 8.5578 8.5578v4.2795h-34.231v-4.2795c0-4.7265 3.8313-8.5578 8.5578-8.5578zm0.42837 6.4188c-1.4184 0-2.5675 1.1491-2.5675 2.5675v3.8512h21.394v-3.8512c0-1.4184-1.1491-2.5675-2.5675-2.5675z" fill="#fff" fill-rule="evenodd" stroke="#050200"/></svg> diff --git a/resources/ui/images/button_resume_game.svg b/resources/ui/images/button_resume_game.svg index 6ad8b64202d0e70f898c16c520e756fe8a934add..2bf973276aefa564ecff7d6149899298344819f9 100644 --- a/resources/ui/images/button_resume_game.svg +++ b/resources/ui/images/button_resume_game.svg @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="UTF-8"?> -<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 93.665 93.676" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect x=".44662" y=".89101" width="92.772" height="91.894" ry="11.689" fill="#49a1ee" stroke="#fff" stroke-width=".238"/><path d="m39.211 31.236c-0.84086-0.84489-2.9911-0.84489-2.9911 0v34.329c0 0.84594 2.1554 0.84594 2.9993 0l28.178-15.637c0.84392-0.84086 0.85812-2.2091 0.01623-3.053z" fill="#fefeff" stroke="#105ca1" stroke-linecap="round" stroke-linejoin="round" stroke-width="6.1726"/><path d="m40.355 33.714c-0.71948-0.72294-2.5594-0.72294-2.5594 0v29.373c0 0.72383 1.8442 0.72383 2.5663 0l24.11-13.38c0.7221-0.71948 0.73426-1.8902 0.01389-2.6124z" fill="#fefeff" stroke="#feffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.225"/><path d="m28.369 66.919v-37.591" fill="#105ca2" stroke="#105ca2" stroke-linecap="round" stroke-width="4.0337"/></svg> +<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 93.665 93.676" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-5.618)" fill="#fff" stroke="#105ea2" stroke-linecap="round" stroke-linejoin="round"><path transform="matrix(-1.3783 -.61747 .61747 -1.3783 55.567 -.086035)" d="m11.645-14.603-44.77-4.6003 26.369-36.472z" stroke-width="7.2832"/><path d="m15.535 12.852 2e-3 67.973z" stroke-width="11"/></g></svg> diff --git a/resources/ui/images/button_start.svg b/resources/ui/images/button_start.svg index e9d49d2172b9a0305db82779971e3c1e12f34a70..4d7634a9f3fb559e590ee965e1341ae2634bf80f 100644 --- a/resources/ui/images/button_start.svg +++ b/resources/ui/images/button_start.svg @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="UTF-8"?> -<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 93.665 93.676" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect x=".44662" y=".89101" width="92.772" height="91.894" ry="11.689" fill="#49a1ee" stroke="#fff" stroke-width=".238"/><path d="m34.852 25.44c-1.1248-1.1302-4.0012-1.1302-4.0012 0v45.921c0 1.1316 2.8832 1.1316 4.0121 0l37.693-20.918c1.1289-1.1248 1.1479-2.9551 0.02171-4.084z" fill="#fefeff" stroke="#105ca1" stroke-linecap="round" stroke-linejoin="round" stroke-width="8.257"/><path d="m36.382 28.754c-0.96243-0.96706-3.4236-0.96706-3.4236 0v39.292c0 0.96825 2.467 0.96825 3.4329 0l32.252-17.898c0.96594-0.96243 0.9822-2.5285 0.01858-3.4945z" fill="#fefeff" stroke="#feffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="4.314"/></svg> +<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 93.665 93.676" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path transform="matrix(-1.3783 -.61747 .61747 -1.3783 46.954 -.086035)" d="m11.645-14.603-44.77-4.6003 26.369-36.472z" fill="#fff" stroke="#105ea2" stroke-linecap="round" stroke-linejoin="round" stroke-width="7.2832"/></svg>