removed push style color multiple, which was silly

This commit is contained in:
Jack Mac 2021-09-25 12:57:52 -04:00
parent c68632d9e4
commit 1082a29a37
2 changed files with 3 additions and 35 deletions

View File

@ -4,6 +4,8 @@
- MSRV is now **1.54**. We soft-updated to this in 0.8.0 with a feature `min-const-generics`, which has now been removed (and as such, we resume having no default features).
- BREAKING: Removed `push_style_colors`. Instead, use `push_style_color` in a loop. This was deprecated in `0.7.0` and should have been removed in `0.8.0`.
## [0.8.0] - 2021-09-17
Welcome to the `0.8.0` update. This is one of the largest updates imgui-rs has ever seen; it will generate errors in a `0.7` project, but hopefully it should be both quick to fix, and enjoyable to update. See our [release page](https://github.com/imgui-rs/imgui-rs/releases/tag/v0.8.0) for more information and a list of contributors to this cycle. Thank you to everyone who uses `imgui-rs`, files issues, and spend their time and effort to PR new changes into the codebase. Because of all that effort, this is by far the best `imgui-rs` has looked!

View File

@ -68,41 +68,7 @@ impl<'ui> Ui<'ui> {
ColorStackToken::new(self)
}
/// Changes style colors by pushing several changes to the color stack.
///
/// Returns a `ColorStackToken` that must be popped by calling `.pop()`
///
/// # Examples
///
/// ```no_run
/// # use imgui::*;
/// # let mut ctx = Context::create();
/// # let ui = ctx.frame();
/// const RED: [f32; 4] = [1.0, 0.0, 0.0, 1.0];
/// const GREEN: [f32; 4] = [0.0, 1.0, 0.0, 1.0];
/// let colors = ui.push_style_colors(&[
/// (StyleColor::Text, RED),
/// (StyleColor::TextDisabled, GREEN),
/// ]);
/// ui.text("I'm red!");
/// ui.text_disabled("I'm green!");
/// colors.pop(&ui);
/// ```
#[deprecated = "deprecated in 0.7.0. Use `push_style_color` multiple times for similar effect."]
pub fn push_style_colors<'a, I>(&self, style_colors: I) -> MultiColorStackToken
where
I: IntoIterator<Item = &'a (StyleColor, [f32; 4])>,
{
let mut count = 0;
for &(style_color, color) in style_colors {
unsafe { sys::igPushStyleColor_Vec4(style_color as i32, color.into()) };
count += 1;
}
MultiColorStackToken {
count,
ctx: self.ctx,
}
}
/// Changes a style variable by pushing a change to the style stack.
///
/// Returns a `StyleStackToken` that can be popped by calling `.end()`