Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,21 @@ import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.filled.Add
import androidx.compose.material.icons.filled.DeleteForever
import androidx.compose.material.icons.filled.Edit
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.Button
import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.ExperimentalMaterial3Api
Expand All @@ -35,9 +38,9 @@ import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.material3.TextFieldDefaults
import androidx.compose.material3.TopAppBar
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.runtime.Composable
Expand All @@ -53,6 +56,7 @@ import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.compose.ui.window.Dialog
import com.retrogbm.R
import com.retrogbm.ui.theme.RetroGBmTheme
import com.retrogbm.utilities.SaveStateType
Expand Down Expand Up @@ -199,50 +203,50 @@ fun InputDialog(
) {
var text by remember { mutableStateOf("") }

AlertDialog(
onDismissRequest = onDismiss,
title = { Text(title) },
containerColor = Color.Black,
titleContentColor = Color.White,
text = {
OutlinedTextField(
colors = TextFieldDefaults.outlinedTextFieldColors(
focusedBorderColor = Color.White,
focusedLabelColor = Color.White,
cursorColor = Color.White,
unfocusedTextColor = Color.White,
unfocusedBorderColor = Color.White,
unfocusedLabelColor = Color.White
),
value = text,
onValueChange = { text = it },
label = { Text("Input") }
)
},
confirmButton = {
TextButton(
colors = ButtonDefaults.textButtonColors(
containerColor = Color.Black,
contentColor = Color.White
),
onClick = {
onConfirm(text)
}
Dialog(onDismissRequest = {
onDismiss()
}) {
Surface(
shape = RoundedCornerShape(8.dp),
color = MaterialTheme.colorScheme.surface,
tonalElevation = 8.dp
) {
Column(
modifier = Modifier
.padding(16.dp)
.width(300.dp),
verticalArrangement = Arrangement.spacedBy(8.dp)
) {
Text("OK")
}
},
dismissButton = {
TextButton(
colors = ButtonDefaults.textButtonColors(
containerColor = Color.Black,
contentColor = Color.White
),
onClick = onDismiss) {
Text("Cancel")
Text(title, style = MaterialTheme.typography.titleMedium)

OutlinedTextField(
value = text,
onValueChange = { text = it },
label = { Text("Cheat Name") },
singleLine = true
)

Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.End
) {
TextButton(onClick = {
onDismiss()
}) {
Text("Cancel")
}

Spacer(modifier = Modifier.width(8.dp))

Button(onClick = {
onConfirm(text)
}) {
Text("OK")
}
}
}
}
)
}
}

@OptIn(ExperimentalMaterial3Api::class)
Expand Down
Loading