~cytrogen/vbhelper

fb6b6d2825d4ff0d45011bf2a134c6bdb95cab15 — Nacho 1 year, 2 months ago e17f6c2
While I'm at it...
- Resized some buttons in the dialogs
- Added a dismiss button in get item dialog after adventure and in the send on adventure choose time dialogs
- Moved the export/import data lower in the settings screen
M app/src/main/java/com/github/nacabaro/vbhelper/screens/adventureScreen/CancelAdventureDialog.kt => app/src/main/java/com/github/nacabaro/vbhelper/screens/adventureScreen/CancelAdventureDialog.kt +1 -1
@@ 64,7 64,7 @@ fun CancelAdventureDialog(
                    Button(
                        onClick = onDismissRequest
                    ) {
                        Text(text = "Cancel")
                        Text(text = "Dismiss")
                    }
                }
            }

M app/src/main/java/com/github/nacabaro/vbhelper/screens/homeScreens/HomeScreen.kt => app/src/main/java/com/github/nacabaro/vbhelper/screens/homeScreens/HomeScreen.kt +14 -4
@@ 3,6 3,7 @@ package com.github.nacabaro.vbhelper.screens.homeScreens
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Button
import androidx.compose.material3.Card


@@ 18,6 19,7 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog
import androidx.navigation.NavController


@@ 120,10 122,18 @@ fun HomeScreen(
                    modifier = Modifier
                        .padding(16.dp)
                ) {
                    Text(text = "One of your characters has finished their adventure mission!")
                    Button(onClick = {
                        adventureMissionsFinished = false
                    }) {
                    Text(
                        text = "One of your characters has finished their adventure mission!",
                        textAlign = TextAlign.Center
                    )
                    Button(
                        onClick = {
                            adventureMissionsFinished = false
                        },
                        modifier = Modifier
                            .padding(8.dp)
                            .fillMaxWidth()
                    ) {
                        Text(text = "Dismiss")
                    }
                }

M app/src/main/java/com/github/nacabaro/vbhelper/screens/itemsScreen/ItemElement.kt => app/src/main/java/com/github/nacabaro/vbhelper/screens/itemsScreen/ItemElement.kt +5 -2
@@ 122,7 122,10 @@ fun ItemDialog(
                    textAlign = TextAlign.Center,
                    fontSize = MaterialTheme.typography.bodyMedium.fontSize,
                    fontFamily = MaterialTheme.typography.bodyMedium.fontFamily,
                    text = description
                    text = description,
                    modifier = Modifier
                        .fillMaxWidth()
                        .padding(4.dp)
                )
                Text(
                    textAlign = TextAlign.Center,


@@ 131,7 134,7 @@ fun ItemDialog(
                    text = "You have $amount of this item",
                    modifier = Modifier
                        .fillMaxWidth()
                        .padding(16.dp)
                        .padding(8.dp)
                )
                Row (
                    horizontalArrangement = Arrangement.Center,

M app/src/main/java/com/github/nacabaro/vbhelper/screens/itemsScreen/ObtainedItemDialog.kt => app/src/main/java/com/github/nacabaro/vbhelper/screens/itemsScreen/ObtainedItemDialog.kt +14 -3
@@ 6,6 6,7 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material3.Button
import androidx.compose.material3.Card
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme


@@ 70,7 71,11 @@ fun ObtainedItemDialog(
                        textAlign = TextAlign.Center,
                        fontSize = MaterialTheme.typography.bodyMedium.fontSize,
                        fontFamily = MaterialTheme.typography.bodyMedium.fontFamily,
                        text = obtainedItem.itemDescription
                        text = obtainedItem.itemDescription,
                        modifier = Modifier
                            .fillMaxWidth()
                            .padding(4.dp)

                    )
                    Text(
                        textAlign = TextAlign.Center,


@@ 79,11 84,17 @@ fun ObtainedItemDialog(
                        text = "You have obtained ${obtainedItem.itemAmount} of this item",
                        modifier = Modifier
                            .fillMaxWidth()
                            .padding(16.dp)
                            .padding(5.dp)
                    )
                    Button(
                        onClick = onClickDismiss,
                        modifier = Modifier
                            .fillMaxWidth()
                    ) {
                        Text(text = "Dismiss")
                    }
                }
            }
        }
    }

}
\ No newline at end of file

M app/src/main/java/com/github/nacabaro/vbhelper/screens/settingsScreen/SettingsScreen.kt => app/src/main/java/com/github/nacabaro/vbhelper/screens/settingsScreen/SettingsScreen.kt +8 -8
@@ 46,21 46,21 @@ fun SettingsScreen(
            SettingsEntry(title = "Import APK", description = "Import Secrets From Vital Arean 2.1.0 APK") {
                settingsScreenController.onClickImportApk()
            }
            SettingsSection("Data management")
            SettingsEntry(title = "Export data", description = "Export application database") {
                settingsScreenController.onClickOpenDirectory()
            }
            SettingsEntry(title = "Import data", description = "Import application database") {
                settingsScreenController.onClickImportDatabase()
            }
            SettingsSection("DiM/BEm management")
            SettingsEntry(title = "Import DiM card", description = "Import DiM/BEm card file") {
            SettingsEntry(title = "Import card", description = "Import DiM/BEm card file") {
                settingsScreenController.onClickImportCard()
            }
            SettingsEntry(title = "Rename DiM/BEm", description = "Set card name") { }
            SettingsSection("About and credits")
            SettingsEntry(title = "Credits", description = "Credits") { }
            SettingsEntry(title = "About", description = "About") { }
            SettingsSection("Data management")
            SettingsEntry(title = "Export data", description = "Export application database") {
                settingsScreenController.onClickOpenDirectory()
            }
            SettingsEntry(title = "Import data", description = "Import application database") {
                settingsScreenController.onClickImportDatabase()
            }
        }
    }
}

M app/src/main/java/com/github/nacabaro/vbhelper/screens/storageScreen/StorageAdventureTimeDialog.kt => app/src/main/java/com/github/nacabaro/vbhelper/screens/storageScreen/StorageAdventureTimeDialog.kt +10 -0
@@ 5,6 5,7 @@ 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.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.material3.Button


@@ 92,6 93,8 @@ fun StorageAdventureTimeDialog(
                    }
                }
                Button(
                    modifier = Modifier
                        .fillMaxWidth(),
                    onClick = {
                        if (itemPosition != -1) {
                            onClickSendToAdventure(times[itemPosition].toLong())


@@ 101,6 104,13 @@ fun StorageAdventureTimeDialog(
                ) {
                    Text(text = "Send on adventure")
                }
                Button(
                    modifier = Modifier
                        .fillMaxWidth(),
                    onClick = onDismissRequest
                ) {
                    Text(text = "Dismiss")
                }
            }
        }
    }

M app/src/main/java/com/github/nacabaro/vbhelper/screens/storageScreen/StorageDialog.kt => app/src/main/java/com/github/nacabaro/vbhelper/screens/storageScreen/StorageDialog.kt +6 -2
@@ 117,8 117,10 @@ fun StorageDialog(
                ) {
                    Button(
                        onClick = onSendToBracelet,
                        modifier = Modifier
                            .weight(1f)
                    ) {
                        Text(text = "Send to bracelet")
                        Text(text = "Send to watch")
                    }
                    Spacer(
                        modifier = Modifier


@@ 134,8 136,10 @@ fun StorageDialog(
                    onClick = {
                        onSendToAdventureClicked = true
                    },
                    modifier = Modifier
                        .fillMaxWidth()
                ) {
                    Text(text = "Send to adventure")
                    Text(text = "Send on adventure")
                }
                Button(
                    modifier = Modifier