Skip to content

Commit

Permalink
Bevy Input Docs : the modules (#9467)
Browse files Browse the repository at this point in the history
# Objective

Complete the documentation of `bevy_input` (#3492).

This PR is part of a triptych of PRs :
- #9468
- #9469

## Solution

Add documentation on modules in `bevy_input`.
  • Loading branch information
tguichaoua authored Aug 23, 2023
1 parent 427ba30 commit 20c85b5
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 0 deletions.
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.

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, ButtonState, 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
8 changes: 8 additions & 0 deletions crates/bevy_input/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#![allow(clippy::type_complexity)]
#![warn(missing_docs)]

//! 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
Expand All @@ -13,6 +20,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

0 comments on commit 20c85b5

Please sign in to comment.