input: Add API to set read_only, password and no_undo_redo falgs

This commit is contained in:
Malik Olivier Boussejra 2018-04-30 12:46:18 +09:00
parent 85bb975e40
commit abd39597ed

View File

@ -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
}
}
}