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]
fn new(
max_length: usize,
selected_text_color: [f32; 4],
selected_background_color: [f32; 4],
use_block_cursor: bool
) -> TextEditing
[src]
max_length: usize,
selected_text_color: [f32; 4],
selected_background_color: [f32; 4],
use_block_cursor: bool
) -> TextEditing
Create a new TextEditing Component
Trait Implementations
impl Component for TextEditing
[src]
type Storage = DenseVecStorage<Self>
Associated storage type for this component.