mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-18 08:58:36 +00:00
Expose background drawlist
This commit is contained in:
parent
c2bb0bd1e2
commit
ebeb92aa8e
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user