-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from KuhakuPixel/feature
[ATG] Freeze value improvement and delete address
- Loading branch information
Showing
4 changed files
with
151 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
ATG/app/src/main/java/com/kuhakupixel/atg/ui/AddressOverlayDialog.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.kuhakupixel.atg.ui | ||
|
||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.material3.Button | ||
import androidx.compose.material3.Checkbox | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.MutableState | ||
import androidx.compose.runtime.mutableStateOf | ||
import androidx.compose.ui.Modifier | ||
import com.kuhakupixel.atg.ui.util.NumberInputField | ||
import com.kuhakupixel.libuberalles.overlay.OverlayContext | ||
import com.kuhakupixel.libuberalles.overlay.service.dialog.OverlayDialog | ||
|
||
class AddressOverlayDialog( | ||
overlayContext: OverlayContext, | ||
alpha: Float = 1.0f, | ||
val onAddressDeleted: () -> Unit | ||
) : | ||
OverlayDialog(overlayContext, alpha = alpha) { | ||
@Composable | ||
override fun DialogBody() { | ||
Row( | ||
modifier = Modifier.fillMaxSize(), | ||
horizontalArrangement = Arrangement.SpaceBetween | ||
) { | ||
Button(onClick = { | ||
onAddressDeleted() | ||
super.close() | ||
}) { | ||
Text("Delete address") | ||
} | ||
} | ||
|
||
} | ||
|
||
fun show(title: String, onConfirm: () -> Unit) { | ||
super.show( | ||
title = title, | ||
onConfirm = onConfirm, | ||
onClose = {} | ||
) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters