Quiztable/src/main/kotlin/components/questiondialog/assets/HintText.kt

48 lines
1.1 KiB
Kotlin

package components.questiondialog.assets
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.em
@Composable
@Suppress("FunctionName")
fun HintText(
topicName: String,
points: UInt,
hint: String,
deferredDouble: Boolean = false,
doubleJeopardy: Boolean = false,
) {
Row(
verticalAlignment = Alignment.Top,
horizontalArrangement = Arrangement.Start,
modifier = Modifier.fillMaxWidth()
) {
Text(
text = """"$topicName" for $points Pts.""",
fontSize = 2.em
)
}
if (deferredDouble) {
Text(
text = """Deferred Double!""",
fontSize = 3.em
)
}
if (doubleJeopardy) {
Text(
text = """Double Jeopardy!""",
fontSize = 3.em
)
}
Text(
text = hint,
fontSize = 5.em
)
}