From 326ebbc164dc6e2aca65be996d56a69df806e11f Mon Sep 17 00:00:00 2001 From: Jonathan Spira Date: Sat, 3 Apr 2021 10:55:37 -0700 Subject: [PATCH] fixed bad doc aliases some in misc were labeled just "doc" instead of "doc(alias". --- imgui/src/widget/misc.rs | 20 ++++++++++---------- imgui/src/window/child_window.rs | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/imgui/src/widget/misc.rs b/imgui/src/widget/misc.rs index 782232f..152753b 100644 --- a/imgui/src/widget/misc.rs +++ b/imgui/src/widget/misc.rs @@ -28,7 +28,7 @@ impl<'ui> Ui<'ui> { /// with `size` set to `[0.0, 0.0]`, which will size the button to the /// label's width in the current style. /// the current style. - #[doc("Button")] + #[doc(alias = "Button")] pub fn button(&self, label: &ImStr) -> bool { self.button_with_size(label, [0.0, 0.0]) } @@ -39,42 +39,42 @@ impl<'ui> Ui<'ui> { /// /// Setting `size` as `[0.0, 0.0]` will size the button to the label's width in /// the current style. - #[doc("Button")] + #[doc(alias = "Button")] pub fn button_with_size(&self, label: &ImStr, size: [f32; 2]) -> bool { unsafe { sys::igButton(label.as_ptr(), size.into()) } } /// Renders a small clickable button that is easy to embed in text. /// /// Returns true if this button was clicked. - #[doc("SmallButton")] + #[doc(alias = "SmallButton")] pub fn small_button(&self, label: &ImStr) -> bool { unsafe { sys::igSmallButton(label.as_ptr()) } } /// Renders a widget with button behaviour without the visual look. /// /// Returns true if this button was clicked. - #[doc("InvisibleButton")] + #[doc(alias = "InvisibleButton")] pub fn invisible_button(&self, id: &ImStr, size: [f32; 2]) -> bool { unsafe { sys::igInvisibleButton(id.as_ptr(), size.into(), 0) } } /// Renders a widget with button behaviour without the visual look. /// /// Returns true if this button was clicked. - #[doc("InvisibleButton")] + #[doc(alias = "InvisibleButton")] pub fn invisible_button_flags(&self, id: &ImStr, size: [f32; 2], flags: ButtonFlags) -> bool { unsafe { sys::igInvisibleButton(id.as_ptr(), size.into(), flags.bits() as i32) } } /// Renders a square button with an arrow shape. /// /// Returns true if this button was clicked. - #[doc("ArrowButton")] + #[doc(alias = "ArrowButton")] pub fn arrow_button(&self, id: &ImStr, direction: Direction) -> bool { unsafe { sys::igArrowButton(id.as_ptr(), direction as i32) } } /// Renders a simple checkbox. /// /// Returns true if this checkbox was clicked. - #[doc("Checkbox")] + #[doc(alias = "Checkbox")] pub fn checkbox(&self, label: &ImStr, value: &mut bool) -> bool { unsafe { sys::igCheckbox(label.as_ptr(), value as *mut bool) } } @@ -99,14 +99,14 @@ impl<'ui> Ui<'ui> { /// Renders a simple radio button. /// /// Returns true if this radio button was clicked. - #[doc("RadioButtonBool")] + #[doc(alias = "RadioButtonBool")] pub fn radio_button_bool(&self, label: &ImStr, active: bool) -> bool { unsafe { sys::igRadioButtonBool(label.as_ptr(), active) } } /// Renders a radio button suitable for choosing an arbitrary value. /// /// Returns true if this radio button was clicked. - #[doc("RadioButtonBool")] + #[doc(alias = "RadioButtonBool")] pub fn radio_button(&self, label: &ImStr, value: &mut T, button_value: T) -> bool where T: Copy + PartialEq, @@ -118,7 +118,7 @@ impl<'ui> Ui<'ui> { pressed } /// Renders a small circle and keeps the cursor on the same line - #[doc("Bullet")] + #[doc(alias = "Bullet")] pub fn bullet(&self) { unsafe { sys::igBullet() }; } diff --git a/imgui/src/window/child_window.rs b/imgui/src/window/child_window.rs index df35ecc..bba54e3 100644 --- a/imgui/src/window/child_window.rs +++ b/imgui/src/window/child_window.rs @@ -20,7 +20,7 @@ pub struct ChildWindow<'a> { impl<'a> ChildWindow<'a> { /// Creates a new child window builder with the given ID - #[doc(alas = "BeginChildID")] + #[doc(alias = "BeginChildID")] pub fn new>>(id: T) -> ChildWindow<'a> { ChildWindow { id: id.into(),