TextDrawer

class TextDrawer(modifier: Modifier = Modifier, onKeyEvent: (KeyEvent, TextFieldValue, StoryStep, Int) -> Boolean = { _, _, _, _ -> false }, textStyle: @Composable (StoryStep) -> TextStyle = { defaultTextStyle(it) }, onTextEdit: (Action.StoryStateChange) -> Unit = { }, commandHandler: TextCommandHandler = TextCommandHandler(emptyMap()), allowLineBreaks: Boolean = false, onLineBreak: (Action.LineBreak) -> Unit = {}, var onFocusChanged: (FocusState) -> 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) -> Boolean = { _, _, _, _ -> false }, textStyle: @Composable (StoryStep) -> TextStyle = { defaultTextStyle(it) }, onTextEdit: (Action.StoryStateChange) -> Unit = { }, commandHandler: TextCommandHandler = TextCommandHandler(emptyMap()), allowLineBreaks: Boolean = false, onLineBreak: (Action.LineBreak) -> Unit = {}, onFocusChanged: (FocusState) -> Unit = {})

Properties

Link copied to clipboard
open override var onFocusChanged: (FocusState) -> 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