Improve end screen
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
<resources>
|
||||
<string name="app_name">YAEP</string>
|
||||
<string name="app_name_full">Yet Another Einstein Puzzle</string>
|
||||
<string name="solved">Congratulations! You solved the puzzle in %1$s</string>
|
||||
<string name="solved_congrats">Congratulations!</string>
|
||||
<string name="solved_time">You solved the puzzle in %1$s</string>
|
||||
<string name="restart">Restart</string>
|
||||
|
||||
<!-- Animals -->
|
||||
|
||||
@@ -5,7 +5,10 @@ import androidx.compose.animation.fadeIn
|
||||
import androidx.compose.animation.fadeOut
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
@@ -17,11 +20,13 @@ import androidx.compose.ui.draw.drawBehind
|
||||
import androidx.compose.ui.graphics.BlurEffect
|
||||
import androidx.compose.ui.graphics.graphicsLayer
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import org.jetbrains.compose.resources.stringResource
|
||||
import yaep.commonui.generated.resources.Res
|
||||
import yaep.commonui.generated.resources.restart
|
||||
import yaep.commonui.generated.resources.solved
|
||||
import yaep.commonui.generated.resources.solved_congrats
|
||||
import yaep.commonui.generated.resources.solved_time
|
||||
|
||||
@Composable
|
||||
fun EndOfGame(
|
||||
@@ -48,10 +53,19 @@ fun EndOfGame(
|
||||
.align(Alignment.Center)
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(Res.string.solved, time),
|
||||
text = stringResource(Res.string.solved_congrats),
|
||||
fontSize = 128.sp,
|
||||
textAlign = TextAlign.Center,
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
)
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
Text(
|
||||
text = stringResource(Res.string.solved_time, time),
|
||||
fontSize = 64.sp,
|
||||
textAlign = TextAlign.Center,
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
)
|
||||
Spacer(modifier = Modifier.height(32.dp))
|
||||
Button(
|
||||
modifier = Modifier.align(CenterHorizontally),
|
||||
onClick = onRestart
|
||||
|
||||
Reference in New Issue
Block a user