Skip to content

Commit

Permalink
Fix comments, fields visibility and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mvlabat committed Feb 19, 2024
1 parent aa1b23e commit 5a5d34c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/render_systems.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@ pub struct ExtractedEguiTextures<'w> {
pub user_textures: Res<'w, EguiUserTextures>,
}

/// RenderLabel type for the egui pass
/// [`RenderLabel`] type for the Egui pass.
#[derive(Debug, Hash, PartialEq, Eq, Clone, RenderLabel)]
pub struct EguiPass {
window_index: u32,
window_generation: u32,
/// Index of the window entity.
pub window_index: u32,
/// Generation of the window entity.
pub window_generation: u32,
}

impl ExtractedEguiTextures<'_> {
Expand Down
3 changes: 2 additions & 1 deletion src/systems.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ use std::marker::PhantomData;

#[allow(missing_docs)]
#[derive(SystemParam)]
// IMPORTANT: remember to add the logic to clear event readers to the `clear` method.
pub struct InputEvents<'w, 's> {
pub ev_cursor_entered: EventReader<'w, 's, CursorEntered>,
pub ev_cursor_left: EventReader<'w, 's, CursorLeft>,
Expand All @@ -41,7 +42,6 @@ pub struct InputEvents<'w, 's> {
impl<'w, 's> InputEvents<'w, 's> {
/// Consumes all the events.
pub fn clear(&mut self) {
self.ev_touch.read().last();
self.ev_cursor_entered.read().last();
self.ev_cursor_left.read().last();
self.ev_cursor.read().last();
Expand All @@ -51,6 +51,7 @@ impl<'w, 's> InputEvents<'w, 's> {
self.ev_keyboard_input.read().last();
self.ev_window_focused.read().last();
self.ev_window_created.read().last();
self.ev_touch.read().last();
}
}

Expand Down

0 comments on commit 5a5d34c

Please sign in to comment.