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
cursor_position: isize
The current editing cursor position, specified in terms of glyphs, not characters.
max_length: usize
The maximum graphemes permitted in this string.
highlight_vector: isize
The amount and direction of glyphs highlighted relative to the cursor.
selected_text_color: [f32; 4]
The color of the text itself when highlighted.
selected_background_color: [f32; 4]
The text background color when highlighted.
use_block_cursor: bool
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]
impl TextEditingpub fn new(
max_length: usize,
selected_text_color: [f32; 4],
selected_background_color: [f32; 4],
use_block_cursor: bool
) -> TextEditing[src]
pub fn new(
max_length: usize,
selected_text_color: [f32; 4],
selected_background_color: [f32; 4],
use_block_cursor: bool
) -> TextEditingCreate a new TextEditing Component
Trait Implementations
impl Component for TextEditing[src]
impl Component for TextEditingtype Storage = DenseVecStorage<Self>
Associated storage type for this component.
Auto Trait Implementations
impl Send for TextEditing
impl Send for TextEditingimpl Sync for TextEditing
impl Sync for TextEditing