2 Commits
0.1.0 ... 0.1.1

Author SHA1 Message Date
485ce337c7 gitignore 2025-08-10 21:15:35 -06:00
7e4c63aa00 0.1.0 - Fixed starting health slider 2025-08-10 21:14:20 -06:00
4 changed files with 12 additions and 2 deletions

1
.gitignore vendored
View File

@@ -13,3 +13,4 @@
.externalNativeBuild
.cxx
local.properties
release/

View File

@@ -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.

View File

@@ -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")
}