Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
485ce337c7
|
|||
|
7e4c63aa00
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -13,3 +13,4 @@
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
local.properties
|
||||
release/
|
||||
@@ -14,7 +14,7 @@ android {
|
||||
minSdk = 35
|
||||
targetSdk = 35
|
||||
versionCode = 1
|
||||
versionName = "0.1.0"
|
||||
versionName = "0.1.1"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -30,6 +30,7 @@ import androidx.compose.ui.unit.dp
|
||||
import com.atridad.magiccounter.ui.state.GameState
|
||||
import com.atridad.magiccounter.ui.state.PlayerState
|
||||
import com.atridad.magiccounter.ui.state.defaultPlayerName
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
|
||||
@Composable
|
||||
@@ -58,7 +59,15 @@ fun SetupScreen(
|
||||
verticalArrangement = Arrangement.spacedBy(16.dp)
|
||||
) {
|
||||
Text("Starting life: $startingLife")
|
||||
Slider(value = startingLife.toFloat(), onValueChange = { startingLife = it.toInt() }, valueRange = 20f..60f, steps = 20)
|
||||
Slider(
|
||||
value = startingLife.toFloat(),
|
||||
onValueChange = {
|
||||
val snapped = ((it / 5f).roundToInt() * 5).coerceIn(10, 40)
|
||||
startingLife = snapped
|
||||
},
|
||||
valueRange = 10f..40f,
|
||||
steps = 5
|
||||
)
|
||||
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.SpaceBetween, modifier = Modifier.fillMaxWidth()) {
|
||||
Text("Players: $playerCount")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user