help tuto
parent
ada54c65dc
commit
856cd6094d
|
@ -0,0 +1,47 @@
|
|||
package main
|
||||
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.material.*
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import main.component.buttonComponent
|
||||
|
||||
@Composable
|
||||
fun HelpPage(onBackClick: () -> Unit) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.padding(16.dp),
|
||||
verticalArrangement = Arrangement.Center,
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
Text("Bienvenue dans l'aide !", style = MaterialTheme.typography.h4)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
|
||||
Text("Contenu de l'aide...")
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
|
||||
buttonComponent("OK", onBackClick)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun HelpButton(onHelpClick: () -> Unit) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.padding(16.dp),
|
||||
contentAlignment = Alignment.BottomEnd
|
||||
) {
|
||||
IconButton(
|
||||
onClick = onHelpClick
|
||||
) {
|
||||
Text("?", fontSize = 24.sp)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -31,6 +31,24 @@ fun homePage(
|
|||
var isCompareClicked by remember { mutableStateOf(false) }
|
||||
var selectedGlossary by remember { mutableStateOf<Glossary?>(null) }
|
||||
|
||||
var showHelpPage by remember { mutableStateOf(false) }
|
||||
|
||||
|
||||
if (showHelpPage) {
|
||||
HelpPage {
|
||||
// Retour depuis la page d'aide
|
||||
showHelpPage = false
|
||||
print("Retour depuis la page d'aide")
|
||||
}
|
||||
} else {
|
||||
|
||||
HelpButton {
|
||||
showHelpPage = true
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (!isCompareClicked && selectedGlossary == null) {
|
||||
// Utilisez un Box pour placer le drapeau en haut à droite
|
||||
Box(
|
||||
|
|
|
@ -9,8 +9,6 @@ import androidx.compose.ui.Modifier
|
|||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.material.Icon
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.ArrowBack
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import main.customRedColor
|
||||
|
||||
|
|
Loading…
Reference in New Issue