mirror of
https://github.com/nacabaro/vbhelper.git
synced 2026-06-05 22:02:54 +00:00
Setup API calls for stage 0 on Digimon name button click.
This commit is contained in:
parent
a011ae39a4
commit
bd0cc46398
@ -312,9 +312,10 @@ fun BattlesScreen() {
|
|||||||
opponentsList.forEach { opponent ->
|
opponentsList.forEach { opponent ->
|
||||||
Button(
|
Button(
|
||||||
onClick = {
|
onClick = {
|
||||||
activeCharacter = opponent
|
activeCharacter?.let {
|
||||||
println("Selected character: ${opponent.name}")
|
RetrofitHelper().getPVPWinner(context, 0, 2, it.name, 0, 0, opponent.name, 0) { apiResult ->
|
||||||
// You can add battle logic here
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
modifier = Modifier.padding(vertical = 4.dp)
|
modifier = Modifier.padding(vertical = 4.dp)
|
||||||
) {
|
) {
|
||||||
@ -347,8 +348,10 @@ fun BattlesScreen() {
|
|||||||
opponentsList.forEach { opponent ->
|
opponentsList.forEach { opponent ->
|
||||||
Button(
|
Button(
|
||||||
onClick = {
|
onClick = {
|
||||||
activeCharacter = opponent
|
activeCharacter?.let {
|
||||||
println("Selected character: ${opponent.name}")
|
RetrofitHelper().getPVPWinner(context, 0, 2, it.name, 1, 0, opponent.name, 1) { apiResult ->
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
modifier = Modifier.padding(vertical = 4.dp)
|
modifier = Modifier.padding(vertical = 4.dp)
|
||||||
) {
|
) {
|
||||||
@ -381,8 +384,10 @@ fun BattlesScreen() {
|
|||||||
opponentsList.forEach { opponent ->
|
opponentsList.forEach { opponent ->
|
||||||
Button(
|
Button(
|
||||||
onClick = {
|
onClick = {
|
||||||
activeCharacter = opponent
|
activeCharacter?.let {
|
||||||
println("Selected character: ${opponent.name}")
|
RetrofitHelper().getPVPWinner(context, 0, 2, it.name, 2, 0, opponent.name, 2) { apiResult ->
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
modifier = Modifier.padding(vertical = 4.dp)
|
modifier = Modifier.padding(vertical = 4.dp)
|
||||||
) {
|
) {
|
||||||
@ -415,8 +420,10 @@ fun BattlesScreen() {
|
|||||||
opponentsList.forEach { opponent ->
|
opponentsList.forEach { opponent ->
|
||||||
Button(
|
Button(
|
||||||
onClick = {
|
onClick = {
|
||||||
activeCharacter = opponent
|
activeCharacter?.let {
|
||||||
println("Selected character: ${opponent.name}")
|
RetrofitHelper().getPVPWinner(context, 0, 2, it.name, 3, 0, opponent.name, 3) { apiResult ->
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
modifier = Modifier.padding(vertical = 4.dp)
|
modifier = Modifier.padding(vertical = 4.dp)
|
||||||
) {
|
) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user