From 8e2c5640e4a7c660945fa3a4026ee59793db7236 Mon Sep 17 00:00:00 2001 From: Cameron Hart Date: Thu, 14 Jan 2016 23:08:12 +1100 Subject: [PATCH] Forgot to expose decimal_precision. --- src/input.rs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/input.rs b/src/input.rs index af3adec..b8bcd86 100644 --- a/src/input.rs +++ b/src/input.rs @@ -211,9 +211,6 @@ impl<'ui, 'p> InputInt<'ui, 'p> { } } - impl_step_params!(InputInt, i32); - impl_text_flags!(InputInt); - pub fn build(self) -> bool { unsafe { imgui_sys::igInputInt( @@ -224,6 +221,9 @@ impl<'ui, 'p> InputInt<'ui, 'p> { self.flags) } } + + impl_step_params!(InputInt, i32); + impl_text_flags!(InputInt); } #[must_use] @@ -250,8 +250,12 @@ impl<'ui, 'p> InputFloat<'ui, 'p> { } } - impl_step_params!(InputFloat, f32); - impl_text_flags!(InputFloat); + pub fn decimal_precision(self, value: i32) -> Self { + InputFloat { + decimal_precision: value, + .. self + } + } pub fn build(self) -> bool { unsafe { @@ -264,4 +268,8 @@ impl<'ui, 'p> InputFloat<'ui, 'p> { self.flags) } } + + impl_step_params!(InputFloat, f32); + impl_text_flags!(InputFloat); + }