Merge pull request #335 from lizhaoxian/expose-background-drawlist

Expose background drawlist
This commit is contained in:
Joonas Javanainen 2020-07-07 22:39:30 +03:00 committed by GitHub
commit d4ec88068f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -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

View File

@ -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