Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bevy Input Docs : the modules #9467

Merged
merged 3 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions crates/bevy_input/src/axis.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! The generic axis type.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the module docs are not very important but this tells me about as much as the name of the module 😅 What is this axis type used for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see what to put here since items of the modules already have relevant docs.
This docs is only here for being able to add #![warn(missing_docs)] on bevy_input.


use bevy_ecs::system::Resource;
use bevy_utils::HashMap;
use std::hash::Hash;
Expand Down
2 changes: 2 additions & 0 deletions crates/bevy_input/src/gamepad.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! The gamepad input functionality.

use crate::{Axis, Input};
use bevy_ecs::event::{Event, EventReader, EventWriter};
use bevy_ecs::{
Expand Down
2 changes: 2 additions & 0 deletions crates/bevy_input/src/input.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! The generic input type.

use bevy_ecs::system::Resource;
use bevy_reflect::{std_traits::ReflectDefault, Reflect};
use bevy_utils::HashSet;
Expand Down
2 changes: 2 additions & 0 deletions crates/bevy_input/src/keyboard.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! The keyboard input functionality.

use crate::{ButtonState, Input};
use bevy_ecs::entity::Entity;
use bevy_ecs::{
Expand Down
7 changes: 7 additions & 0 deletions crates/bevy_input/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#![allow(clippy::type_complexity)]

//! Input functionality for the [Bevy game engine](https://bevyengine.org/).
//!
//! # Supported input devices
//!
//! `bevy` currently supports keyboard, mouse, gamepad, and touch inputs.

mod axis;
/// Common run conditions
pub mod common_conditions;
Expand All @@ -13,6 +19,7 @@ pub mod touchpad;
pub use axis::*;
pub use input::*;

/// Most commonly used re-exported types.
pub mod prelude {
#[doc(hidden)]
pub use crate::{
Expand Down
2 changes: 2 additions & 0 deletions crates/bevy_input/src/mouse.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! The mouse input functionality.

use crate::{ButtonState, Input};
use bevy_ecs::entity::Entity;
use bevy_ecs::{
Expand Down
2 changes: 2 additions & 0 deletions crates/bevy_input/src/touch.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! The touch input functionality.

use bevy_ecs::event::{Event, EventReader};
use bevy_ecs::system::{ResMut, Resource};
use bevy_math::Vec2;
Expand Down
2 changes: 2 additions & 0 deletions crates/bevy_input/src/touchpad.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! The touchpad input functionality.

use bevy_ecs::event::Event;
use bevy_reflect::Reflect;

Expand Down
Loading