mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-15 07:28:28 +00:00
Merge pull request #335 from lizhaoxian/expose-background-drawlist
Expose background drawlist
This commit is contained in:
commit
d4ec88068f
@ -544,6 +544,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(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