mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-13 06:28:36 +00:00
input: Add API to set read_only, password and no_undo_redo falgs
This commit is contained in:
parent
85bb975e40
commit
abd39597ed
18
src/input.rs
18
src/input.rs
@ -89,6 +89,24 @@ macro_rules! impl_text_flags {
|
||||
self.flags.set(ImGuiInputTextFlags::AlwaysInsertMode, value);
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn read_only(mut self, value: bool) -> Self {
|
||||
self.flags.set(ImGuiInputTextFlags::ReadOnly, value);
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn password(mut self, value: bool) -> Self {
|
||||
self.flags.set(ImGuiInputTextFlags::Password, value);
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn no_undo_redo(mut self, value: bool) -> Self {
|
||||
self.flags.set(ImGuiInputTextFlags::NoUndoRedo, value);
|
||||
self
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user