TextDrawer
class TextDrawer(modifier: Modifier = Modifier, onKeyEvent: (KeyEvent, TextFieldValue, StoryStep, Int, EmptyErase, Int, EndOfText) -> Boolean = { _, _, _, _, _, _, _ -> false }, textStyle: @Composable (StoryStep) -> TextStyle = { defaultTextStyle(it) }, onTextEdit: (TextInput, Int, Boolean) -> Unit = { _, _, _ -> }, lineBreakByContent: Boolean = true, emptyErase: EmptyErase = EmptyErase.CHANGE_TYPE, var onFocusChanged: (Int, FocusState) -> Unit = { _, _ -> }, selectionState: StateFlow<Boolean>, onSelectionLister: (Int) -> Unit) : SimpleTextDrawer
Simple message drawer intended to be used as a component for more complex drawers. This class contains the logic of the basic message of the SDK. As many other drawers need some text in it this Drawer can be used instead of duplicating this text logic.
Constructors
Link copied to clipboard
constructor(modifier: Modifier = Modifier, onKeyEvent: (KeyEvent, TextFieldValue, StoryStep, Int, EmptyErase, Int, EndOfText) -> Boolean = { _, _, _, _, _, _, _ -> false }, textStyle: @Composable (StoryStep) -> TextStyle = { defaultTextStyle(it) }, onTextEdit: (TextInput, Int, Boolean) -> Unit = { _, _, _ -> }, lineBreakByContent: Boolean = true, emptyErase: EmptyErase = EmptyErase.CHANGE_TYPE, onFocusChanged: (Int, FocusState) -> Unit = { _, _ -> }, selectionState: StateFlow<Boolean>, onSelectionLister: (Int) -> Unit)
Functions
Link copied to clipboard
open override fun Text(step: StoryStep, drawInfo: DrawInfo, interactionSource: MutableInteractionSource, focusRequester: FocusRequester?, decorationBox: @Composable (innerTextField: @Composable () -> Unit) -> Unit)
Draws the StoryStep including its DrawInfo