Struct amethyst_ui::TextEditing [] [src]

pub struct TextEditing {
    pub cursor_position: isize,
    pub max_length: usize,
    pub highlight_vector: isize,
    pub selected_text_color: [f32; 4],
    pub selected_background_color: [f32; 4],
    pub use_block_cursor: bool,
    // some fields omitted
}

If this component is attached to an entity with a UiText then that UiText is editable. This component also controls how that editing works.

Fields

The current editing cursor position, specified in terms of glyphs, not characters.

The maximum graphemes permitted in this string.

The amount and direction of glyphs highlighted relative to the cursor.

The color of the text itself when highlighted.

The text background color when highlighted.

If this is true the text will use a block cursor for editing. Otherwise this uses a standard line cursor. This is not recommended if your font is not monospace.

Methods

impl TextEditing
[src]

[src]

Create a new TextEditing Component

Trait Implementations

impl Component for TextEditing
[src]

Associated storage type for this component.