pub fn with_color_var<F: FnOnce()>(&self, var: StyleColor, color: [f32; 4], f: F) {
        unsafe {
            sys::igPushStyleColor(var as _, color.into());
        }
        f();
        unsafe {
            sys::igPopStyleColor(1);
        }
    }
/// Runs a function after temporarily pushing a value to the color stack.
///
/// # Example
/// ```rust,no_run
/// # use imgui::*;
/// # let mut imgui = Context::create();
/// # let ui = imgui.frame();
/// ui.with_color_var(StyleColor::Text, [1.0, 0.0, 0.0, 1.0], || {
///     ui.text_wrapped(im_str!("AB"));
/// });
/// ```
Runs a function after temporarily pushing a value to the color stack.
Runs a function after temporarily pushing a value to the color stack .
pub fn with_color_var<F: FnOnce()>(&self, var: StyleColor, color: [f32; 4], f: F) {
        unsafe {
            sys::igPushStyleColor(var as _, color.into());
        }
        f();
        unsafe {
            sys::igPopStyleColor(1);
        }
    }
pub fn with_color_var < F : FnOnce ( ) > ( & self , var : StyleColor , color : [ f32 ; 4 ] , f : F ) { unsafe { sys :: igPushStyleColor ( var as _ , color . into ( ) ) ; } f ( ) ; unsafe { sys :: igPopStyleColor ( 1 ) ; } }
Runs a function after temporarily pushing a value to the color stack.
Runs a function after temporarily pushing a value to the color stack .
&self
var
StyleColor
color
[f32; 4]
f
F
example
None
use imgui::*;
None
let mut imgui = context::create();
None
let ui = imgui.frame();
None