pub struct Frame<'a> { /* private fields */ }Expand description
A frame of the debug UI, from DebugUi::frame: its windows are
filled, then Frame::finish pushes what they draw. Dropped, it ends
the frame: a frame not finished draws nothing, and its input is spent.
Implementations§
Source§impl Frame<'_>
impl Frame<'_>
Sourcepub fn window(
&mut self,
title: impl Display,
first: Rect,
add: impl FnOnce(&mut Ui<'_>),
) -> bool
pub fn window( &mut self, title: impl Display, first: Rect, add: impl FnOnce(&mut Ui<'_>), ) -> bool
A window titled title, filled by add, which is not called while
the window is collapsed. Returns whether it is open: not collapsed.
- It shows at
firstthe first time, unless a place was set for it (DebugUi::set_place), and keeps its place after. - It is drawn in front of the windows already open, and comes to the front when it is pressed.
- Its title bar drags it, kept at least partly on screen, and its box on the left collapses it; the grip at its bottom-right corner resizes it; when its content is taller than it, the wheel over it or its scrollbar’s thumb scrolls it. A drag starts from where it is drawn, which is its place moved on screen if it was off it.
"Title##key"showsTitleand is the windowkey, whose place is kept as the title changes. A second call of one window in a frame continues its content.- With no output to draw on (a size of 0), nothing is shown.
Sourcepub fn finish(self, out: &mut UiList)
pub fn finish(self, out: &mut UiList)
Pushes what the frame’s windows draw into out
(RenderFrame::ui), window by window from back to front, an open
combo’s list last: in the top layer at the last depth
(SortMode::Fixed(u32::MAX)), at the style’s scale, each cut to its
window. Call it after the game’s UI is pushed, which then draws
behind it. The list’s view is put back as it was.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Frame<'a>
impl<'a> !Send for Frame<'a>
impl<'a> !Sync for Frame<'a>
impl<'a> !UnwindSafe for Frame<'a>
impl<'a> Forget for Frame<'a>
impl<'a> Freeze for Frame<'a>
impl<'a> Move for Frame<'a>
impl<'a> Unpin for Frame<'a>
impl<'a> UnsafeUnpin for Frame<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more