pub struct TextInputConfig {
pub placeholder: String,
pub max_length: Option<usize>,
pub is_password: bool,
pub is_multiline: bool,
pub font_size: u16,
pub text_color: Color,
pub placeholder_color: Color,
pub cursor_color: Color,
pub selection_color: Color,
pub line_height: u16,
pub no_styles_movement: bool,
pub font_asset: Option<&'static FontAsset>,
}Expand description
Configuration for a text input element’s visual appearance.
Stored per-frame in PlyContext::text_input_configs.
Fields§
§placeholder: StringPlaceholder text shown when input is empty.
max_length: Option<usize>Maximum number of characters allowed. None = unlimited.
is_password: boolWhen true, characters are displayed as •.
is_multiline: boolWhen true, the input supports multiple lines (Enter inserts newline).
font_size: u16Font size in pixels.
text_color: ColorColor of the input text.
placeholder_color: ColorColor of the placeholder text.
cursor_color: ColorColor of the cursor line.
selection_color: ColorColor of the selection highlight rectangle.
line_height: u16Override line height in pixels. When 0 (default), the natural font height is used.
no_styles_movement: boolWhen true, cursor movement skips over } and empty content style positions.
font_asset: Option<&'static FontAsset>The font asset to use. Resolved by the renderer.
Trait Implementations§
Source§impl Clone for TextInputConfig
impl Clone for TextInputConfig
Source§fn clone(&self) -> TextInputConfig
fn clone(&self) -> TextInputConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextInputConfig
impl Debug for TextInputConfig
Auto Trait Implementations§
impl Freeze for TextInputConfig
impl RefUnwindSafe for TextInputConfig
impl Send for TextInputConfig
impl Sync for TextInputConfig
impl Unpin for TextInputConfig
impl UnsafeUnpin for TextInputConfig
impl UnwindSafe for TextInputConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more