Skip to content
Snippets Groups Projects
Commit 9dd6b9bf authored by Benoît Harrault's avatar Benoît Harrault
Browse files

Move restart game button, activate on long press

parent 247e5e84
No related branches found
No related tags found
1 merge request!55Resolve "Add confirmation on restart game button"
Pipeline #2117 passed
org.gradle.jvmargs=-Xmx1536M org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
app.versionName=0.1.0 app.versionName=0.1.1
app.versionCode=49 app.versionCode=50
Move restart game button to first place, triggered with long press
Déplacement du bouton de retour au menu en première position, activation par appui long
...@@ -76,6 +76,24 @@ class _HomeState extends State<Home> { ...@@ -76,6 +76,24 @@ class _HomeState extends State<Home> {
if (myProvider.gameIsRunning) { if (myProvider.gameIsRunning) {
menuActions = [ menuActions = [
FlatButton(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
border: Border.all(
color: Colors.blue,
width: 4,
),
),
margin: EdgeInsets.all(8),
child: Image(
image: AssetImage('assets/icons/button_back.png'),
fit: BoxFit.fill
),
),
onLongPress: () => GameUtils.resetGame(myProvider),
),
Spacer(flex: 6),
FlatButton( FlatButton(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
...@@ -108,6 +126,7 @@ class _HomeState extends State<Home> { ...@@ -108,6 +126,7 @@ class _HomeState extends State<Home> {
), ),
onPressed: () => GameUtils.showTip(myProvider), onPressed: () => GameUtils.showTip(myProvider),
), ),
Spacer(),
FlatButton( FlatButton(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
...@@ -127,23 +146,6 @@ class _HomeState extends State<Home> { ...@@ -127,23 +146,6 @@ class _HomeState extends State<Home> {
myProvider.toggleShowConflicts(); myProvider.toggleShowConflicts();
}, },
), ),
FlatButton(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
border: Border.all(
color: Colors.blue,
width: 4,
),
),
margin: EdgeInsets.all(8),
child: Image(
image: AssetImage('assets/icons/button_back.png'),
fit: BoxFit.fill
),
),
onPressed: () => GameUtils.resetGame(myProvider),
),
]; ];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment