Skip to content

Commit

Permalink
Make processors, Virtual pads, and GamepadStick fields public (#658)
Browse files Browse the repository at this point in the history
  • Loading branch information
jf908 authored Nov 18, 2024
1 parent d1cb595 commit c2c80ee
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
10 changes: 5 additions & 5 deletions src/user_input/gamepad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,10 @@ impl Axislike for GamepadAxis {
#[must_use]
pub struct GamepadControlAxis {
/// The wrapped axis.
pub(crate) axis: GamepadAxisType,
pub axis: GamepadAxisType,

/// A processing pipeline that handles input values.
pub(crate) processors: Vec<AxisProcessor>,
pub processors: Vec<AxisProcessor>,
}

impl GamepadControlAxis {
Expand Down Expand Up @@ -429,13 +429,13 @@ impl WithAxisProcessingPipelineExt for GamepadControlAxis {
#[must_use]
pub struct GamepadStick {
/// Horizontal movement of the stick.
pub(crate) x: GamepadAxisType,
pub x: GamepadAxisType,

/// Vertical movement of the stick.
pub(crate) y: GamepadAxisType,
pub y: GamepadAxisType,

/// A processing pipeline that handles input values.
pub(crate) processors: Vec<DualAxisProcessor>,
pub processors: Vec<DualAxisProcessor>,
}

impl GamepadStick {
Expand Down
8 changes: 4 additions & 4 deletions src/user_input/mouse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ pub struct MouseMoveAxis {
pub axis: DualAxisType,

/// A processing pipeline that handles input values.
pub(crate) processors: Vec<AxisProcessor>,
pub processors: Vec<AxisProcessor>,
}

impl MouseMoveAxis {
Expand Down Expand Up @@ -382,7 +382,7 @@ impl WithAxisProcessingPipelineExt for MouseMoveAxis {
#[must_use]
pub struct MouseMove {
/// A processing pipeline that handles input values.
pub(crate) processors: Vec<DualAxisProcessor>,
pub processors: Vec<DualAxisProcessor>,
}

impl UpdatableInput for MouseMove {
Expand Down Expand Up @@ -628,7 +628,7 @@ pub struct MouseScrollAxis {
pub axis: DualAxisType,

/// A processing pipeline that handles input values.
pub(crate) processors: Vec<AxisProcessor>,
pub processors: Vec<AxisProcessor>,
}

impl MouseScrollAxis {
Expand Down Expand Up @@ -761,7 +761,7 @@ impl WithAxisProcessingPipelineExt for MouseScrollAxis {
#[must_use]
pub struct MouseScroll {
/// A processing pipeline that handles input values.
pub(crate) processors: Vec<DualAxisProcessor>,
pub processors: Vec<DualAxisProcessor>,
}

impl UpdatableInput for MouseScroll {
Expand Down
28 changes: 14 additions & 14 deletions src/user_input/virtual_axial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ use serde::{Deserialize, Serialize};
#[must_use]
pub struct VirtualAxis {
/// The button that represents the negative direction.
pub(crate) negative: Box<dyn Buttonlike>,
pub negative: Box<dyn Buttonlike>,

/// The button that represents the positive direction.
pub(crate) positive: Box<dyn Buttonlike>,
pub positive: Box<dyn Buttonlike>,

/// A processing pipeline that handles input values.
pub(crate) processors: Vec<AxisProcessor>,
pub processors: Vec<AxisProcessor>,
}

impl VirtualAxis {
Expand Down Expand Up @@ -295,19 +295,19 @@ impl WithAxisProcessingPipelineExt for VirtualAxis {
#[must_use]
pub struct VirtualDPad {
/// The button for the upward direction.
pub(crate) up: Box<dyn Buttonlike>,
pub up: Box<dyn Buttonlike>,

/// The button for the downward direction.
pub(crate) down: Box<dyn Buttonlike>,
pub down: Box<dyn Buttonlike>,

/// The button for the leftward direction.
pub(crate) left: Box<dyn Buttonlike>,
pub left: Box<dyn Buttonlike>,

/// The button for the rightward direction.
pub(crate) right: Box<dyn Buttonlike>,
pub right: Box<dyn Buttonlike>,

/// A processing pipeline that handles input values.
pub(crate) processors: Vec<DualAxisProcessor>,
pub processors: Vec<DualAxisProcessor>,
}

impl VirtualDPad {
Expand Down Expand Up @@ -503,22 +503,22 @@ impl WithDualAxisProcessingPipelineExt for VirtualDPad {
#[must_use]
pub struct VirtualDPad3D {
/// The button for the upward direction.
pub(crate) up: Box<dyn Buttonlike>,
pub up: Box<dyn Buttonlike>,

/// The button for the downward direction.
pub(crate) down: Box<dyn Buttonlike>,
pub down: Box<dyn Buttonlike>,

/// The button for the leftward direction.
pub(crate) left: Box<dyn Buttonlike>,
pub left: Box<dyn Buttonlike>,

/// The button for the rightward direction.
pub(crate) right: Box<dyn Buttonlike>,
pub right: Box<dyn Buttonlike>,

/// The button for the forward direction.
pub(crate) forward: Box<dyn Buttonlike>,
pub forward: Box<dyn Buttonlike>,

/// The button for the backward direction.
pub(crate) backward: Box<dyn Buttonlike>,
pub backward: Box<dyn Buttonlike>,
}

impl VirtualDPad3D {
Expand Down

0 comments on commit c2c80ee

Please sign in to comment.