mirror of
https://github.com/nacabaro/vbhelper.git
synced 2026-01-27 16:05:32 +00:00
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
This commit is contained in:
parent
e17f6c23e4
commit
fb6b6d2825
@ -64,7 +64,7 @@ fun CancelAdventureDialog(
|
|||||||
Button(
|
Button(
|
||||||
onClick = onDismissRequest
|
onClick = onDismissRequest
|
||||||
) {
|
) {
|
||||||
Text(text = "Cancel")
|
Text(text = "Dismiss")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.github.nacabaro.vbhelper.screens.homeScreens
|
|||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.material3.Button
|
import androidx.compose.material3.Button
|
||||||
import androidx.compose.material3.Card
|
import androidx.compose.material3.Card
|
||||||
@ -18,6 +19,7 @@ import androidx.compose.runtime.setValue
|
|||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
|
import androidx.compose.ui.text.style.TextAlign
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.window.Dialog
|
import androidx.compose.ui.window.Dialog
|
||||||
import androidx.navigation.NavController
|
import androidx.navigation.NavController
|
||||||
@ -120,10 +122,18 @@ fun HomeScreen(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(16.dp)
|
.padding(16.dp)
|
||||||
) {
|
) {
|
||||||
Text(text = "One of your characters has finished their adventure mission!")
|
Text(
|
||||||
Button(onClick = {
|
text = "One of your characters has finished their adventure mission!",
|
||||||
adventureMissionsFinished = false
|
textAlign = TextAlign.Center
|
||||||
}) {
|
)
|
||||||
|
Button(
|
||||||
|
onClick = {
|
||||||
|
adventureMissionsFinished = false
|
||||||
|
},
|
||||||
|
modifier = Modifier
|
||||||
|
.padding(8.dp)
|
||||||
|
.fillMaxWidth()
|
||||||
|
) {
|
||||||
Text(text = "Dismiss")
|
Text(text = "Dismiss")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -122,7 +122,10 @@ fun ItemDialog(
|
|||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
fontSize = MaterialTheme.typography.bodyMedium.fontSize,
|
fontSize = MaterialTheme.typography.bodyMedium.fontSize,
|
||||||
fontFamily = MaterialTheme.typography.bodyMedium.fontFamily,
|
fontFamily = MaterialTheme.typography.bodyMedium.fontFamily,
|
||||||
text = description
|
text = description,
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(4.dp)
|
||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
@ -131,7 +134,7 @@ fun ItemDialog(
|
|||||||
text = "You have $amount of this item",
|
text = "You have $amount of this item",
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(16.dp)
|
.padding(8.dp)
|
||||||
)
|
)
|
||||||
Row (
|
Row (
|
||||||
horizontalArrangement = Arrangement.Center,
|
horizontalArrangement = Arrangement.Center,
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import androidx.compose.foundation.layout.Row
|
|||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
|
import androidx.compose.material3.Button
|
||||||
import androidx.compose.material3.Card
|
import androidx.compose.material3.Card
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
@ -70,7 +71,11 @@ fun ObtainedItemDialog(
|
|||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
fontSize = MaterialTheme.typography.bodyMedium.fontSize,
|
fontSize = MaterialTheme.typography.bodyMedium.fontSize,
|
||||||
fontFamily = MaterialTheme.typography.bodyMedium.fontFamily,
|
fontFamily = MaterialTheme.typography.bodyMedium.fontFamily,
|
||||||
text = obtainedItem.itemDescription
|
text = obtainedItem.itemDescription,
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(4.dp)
|
||||||
|
|
||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
@ -79,11 +84,17 @@ fun ObtainedItemDialog(
|
|||||||
text = "You have obtained ${obtainedItem.itemAmount} of this item",
|
text = "You have obtained ${obtainedItem.itemAmount} of this item",
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(16.dp)
|
.padding(5.dp)
|
||||||
)
|
)
|
||||||
|
Button(
|
||||||
|
onClick = onClickDismiss,
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
) {
|
||||||
|
Text(text = "Dismiss")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -46,6 +46,14 @@ fun SettingsScreen(
|
|||||||
SettingsEntry(title = "Import APK", description = "Import Secrets From Vital Arean 2.1.0 APK") {
|
SettingsEntry(title = "Import APK", description = "Import Secrets From Vital Arean 2.1.0 APK") {
|
||||||
settingsScreenController.onClickImportApk()
|
settingsScreenController.onClickImportApk()
|
||||||
}
|
}
|
||||||
|
SettingsSection("DiM/BEm management")
|
||||||
|
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")
|
SettingsSection("Data management")
|
||||||
SettingsEntry(title = "Export data", description = "Export application database") {
|
SettingsEntry(title = "Export data", description = "Export application database") {
|
||||||
settingsScreenController.onClickOpenDirectory()
|
settingsScreenController.onClickOpenDirectory()
|
||||||
@ -53,14 +61,6 @@ fun SettingsScreen(
|
|||||||
SettingsEntry(title = "Import data", description = "Import application database") {
|
SettingsEntry(title = "Import data", description = "Import application database") {
|
||||||
settingsScreenController.onClickImportDatabase()
|
settingsScreenController.onClickImportDatabase()
|
||||||
}
|
}
|
||||||
SettingsSection("DiM/BEm management")
|
|
||||||
SettingsEntry(title = "Import DiM 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") { }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import androidx.compose.foundation.layout.Arrangement
|
|||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.material3.Button
|
import androidx.compose.material3.Button
|
||||||
@ -92,6 +93,8 @@ fun StorageAdventureTimeDialog(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Button(
|
Button(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth(),
|
||||||
onClick = {
|
onClick = {
|
||||||
if (itemPosition != -1) {
|
if (itemPosition != -1) {
|
||||||
onClickSendToAdventure(times[itemPosition].toLong())
|
onClickSendToAdventure(times[itemPosition].toLong())
|
||||||
@ -101,6 +104,13 @@ fun StorageAdventureTimeDialog(
|
|||||||
) {
|
) {
|
||||||
Text(text = "Send on adventure")
|
Text(text = "Send on adventure")
|
||||||
}
|
}
|
||||||
|
Button(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth(),
|
||||||
|
onClick = onDismissRequest
|
||||||
|
) {
|
||||||
|
Text(text = "Dismiss")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -117,8 +117,10 @@ fun StorageDialog(
|
|||||||
) {
|
) {
|
||||||
Button(
|
Button(
|
||||||
onClick = onSendToBracelet,
|
onClick = onSendToBracelet,
|
||||||
|
modifier = Modifier
|
||||||
|
.weight(1f)
|
||||||
) {
|
) {
|
||||||
Text(text = "Send to bracelet")
|
Text(text = "Send to watch")
|
||||||
}
|
}
|
||||||
Spacer(
|
Spacer(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
@ -134,8 +136,10 @@ fun StorageDialog(
|
|||||||
onClick = {
|
onClick = {
|
||||||
onSendToAdventureClicked = true
|
onSendToAdventureClicked = true
|
||||||
},
|
},
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
) {
|
) {
|
||||||
Text(text = "Send to adventure")
|
Text(text = "Send on adventure")
|
||||||
}
|
}
|
||||||
Button(
|
Button(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user