Expose background drawlist

This commit is contained in:
Zhaoxian Li 2020-06-21 22:05:57 +08:00
parent c2bb0bd1e2
commit ebeb92aa8e
2 changed files with 12 additions and 0 deletions

View File

@ -515,6 +515,11 @@ impl<'ui> Ui<'ui> {
pub fn get_window_draw_list(&'ui self) -> WindowDrawList<'ui> {
WindowDrawList::new(self)
}
#[must_use]
pub fn get_background_draw_list(&'ui self) -> WindowDrawList<'ui> {
WindowDrawList::new(self).background()
}
}
/// Condition for applying a setting

View File

@ -82,6 +82,13 @@ impl<'ui> WindowDrawList<'ui> {
}
}
pub(crate) fn background(&mut self) -> Self {
Self {
draw_list: unsafe { sys::igGetBackgroundDrawList() },
_phantom: PhantomData,
}
}
/// Split into *channels_count* drawing channels.
/// At the end of the closure, the channels are merged. The objects
/// are then drawn in the increasing order of their channel number, and not